bevy_rapier
bevy_rapier copied to clipboard
Example of interpolated physics
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 with TransformInterpolation
exist but I cannot get these to work because I'm not sure which schedules need to be setup. It also seems that TransformInterpolation
is specific to RigidBody
and wouldn't work with a KinematicCharacterController
.
I think that having a minimal 3D example which demonstrates a KinematicCharacterController
and a Rigidbody
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.