Open jf908 opened 1 year ago
I also ran into this when I tried to switch to FixedUpdate to make my physics more consistent across systems and platforms but there doesn't seem to be a way to do this properly as of writing.
Right now I've accepted this limitation for now by linking my camera updates to FixedUpdate so I at least have something, but it's still pretty jank and jittery, especially on web builds.
There seems to be a pr addressing this unless I'm mistaken (https://github.com/dimforge/bevy_rapier/pull/474) but it's gone relatively stale.
I would expect that using a fixed physics tick rate with interpolated positions would be the default setup for most 3D games. It's the norm from other 3D game engines because tying physics to frame rate can make movement significantly inconsistent depending on how fast the game is running and without interpolation, movement won't look smooth when the game's framerate exceeds the physics tick rate.
I see that
TimestepMode::Interpolated
along withTransformInterpolation
exist but I cannot get these to work because I'm not sure which schedules need to be setup. It also seems thatTransformInterpolation
is specific toRigidBody
and wouldn't work with aKinematicCharacterController
.I think that having a minimal 3D example which demonstrates a
KinematicCharacterController
and aRigidbody
that simulate at a fixed tick rate but with interpolated positions would be extremely useful because I suspect that its the most prominent use case for using this library when making a 3D game. This all applies to 2D as well but it seems more common for 2D games to run at a fixed framerate. bevy-rapier has generally been a joy to learn and work with but this point has been particularly puzzling me.