idanarye / bevy-tnua

A floating character controller for Bevy
https://crates.io/crates/bevy-tnua
Apache License 2.0
180 stars 12 forks source link

Guidance on Syncing First Person Camera with Player Body in bevy-tnua #33

Closed Sandvoxel closed 6 months ago

Sandvoxel commented 6 months ago

I'm currently working on a project where I've successfully implemented a first-person camera that follows a player's body. However, I'm encountering an issue where the camera lags behind the physics movements, particularly noticeable at higher speeds or abrupt changes in direction. This lag seems to stem from the impulses being applied within the plugin itself.

Could you advise on the best approach to keep the camera in sync with the player's physics body, ensuring smooth and responsive camera movement that matches the player's motion?

Sandvoxel commented 6 months ago

Solved on own using bevy_xpbd answer can be found here if anyone ever needs it https://github.com/Jondolf/bevy_xpbd/issues/211