idanarye / bevy-tnua

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

Character-tracking entity for easier camera controller integration #60

Open idanarye opened 2 months ago

idanarye commented 2 months ago

If a camera tries to track the player directly, the tiny jittering of the floating capsule model will get amplified to the point of noticeablity when they get transferred to the camera. Smoothing can help, but the third party camera plugin may not support smoothing.

Tnua can and should help with that. It can provide a mechanism for adding a third entity that track the character but uses knowledge from Tnua to overcome the jittering and stabilize it (e.g. - keep at ground height when jumping). The camera (and maybe other things?) can then track that entity instead of the character entity directly.