Closed CashWasabi closed 1 year ago
I added the changes you last mentioned and ran cargo fmt
on the codebase. I also squashed the commit since the last two commits we're just small fixes with no real information.
I also squashed the commit since the last two commits we're just small fixes with no real information.
In the future, there's no need to do this for this repo since I squash commits on merge (as of 0.4) anyway. Actually, having the smaller commits before merge makes it easier to see what has changed since the last review
I was working on the same update (not noticing this PR exists). In my case, I found it necessary to use .normalize_or_zero()
instead of .normalize()
because the first mob (spawning closest to the player), when returning, got to the exact same spot from where he was starting, creating his vector zero, having .normalize panic. I wonder why It doesn't happen here (that he doesn't return to the exact spot).
Summary
The refactor consists of basically two things:
bevy_rapier2d
in platformer examplebevy_rapier2d
in cargo file and removeheron
For the most part I tried to not change too much of the platformer example. There we're some minor things though that came up whith which I had to struggle a bit.
Notable Details
CollisionShape
->Collider
Velocity.linear
->Velocity.linvel
SensorBundle
since there is noRigidBody::Sensor
inrapier2d
0.0
because the collider kept sticking to the wall when moving against it in airRapierDebugRenderPlugin
to showcase colliders with gizmospause_physics_during_load
uses RapierConfiguration nowExternalForce
toColliderBundle
for jumpsIssues
I noticed that my fix for
pause_physics_during_load
might not work as excepted. Sometimes when building I have to pressR
to reload the level when I want to have theGroundSensor
working. This might be a loading issue but I didn't find the correct solution yet.