Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of interpolated physics #422

Open
jf908 opened this issue Aug 25, 2023 · 1 comment
Open

Example of interpolated physics #422

jf908 opened this issue Aug 25, 2023 · 1 comment
Labels
A-Integration very bevy specific D-Medium documentation Improvements or additions to documentation P-Low S-not-started Work has not started

Comments

@jf908
Copy link

jf908 commented Aug 25, 2023

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.

@jonastar
Copy link

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 (#474) but it's gone relatively stale.

@Vrixyz Vrixyz added documentation Improvements or additions to documentation D-Medium P-Low S-not-started Work has not started A-Integration very bevy specific labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Integration very bevy specific D-Medium documentation Improvements or additions to documentation P-Low S-not-started Work has not started
Projects
None yet
Development

No branches or pull requests

3 participants