ASU-CodeDevils / CD-GameDev

A game made in Rust.
2 stars 1 forks source link

fix: player no longer bounces when crossing tile boundaries fixes #18 #21

Open joshuawalker3 opened 1 week ago

joshuawalker3 commented 1 week ago

Objective

Fixes #18 Fix issue where player bounced when crossing tile boundaries.

Solution

To solve this issue the player collider was changed to be flat on the bottom and sides and a collision margin was added to the players collider. This change introduced a new bug where there were moments in time when the player could not jump while moving or while touching walls due to how the collider interacted with the sides of tile colliders. This was solved by changing the size of the shape caster generated when the new Character Controller Bundle was created. Scale was decreased from 0.99 to 0.75.

Testing

Tested by running game with PhysicsDebugger plugin, moving character across tile boundaries, and verifying correct force vector response. Moved player against wall, verified no force vector applied while static and jumping