I want to achieve a character can follow a rotating platform to move.
However I found move_and_slide do the job but is not perfect.
Somehow when time moves, the position of kinematic character will shift.
So how to solve it?
My code in kinematic body:
vel = Vector3()
func _physics_process(delta):
vel.y += g*delta
vel = move_and_slide(vel, Vector3(0, 1, 0))
My rotating platform is a rigidbody in kinematic mode and rotated by animation player
Thanks!
please find my project in the link:
https://drive.google.com/file/d/19mSzlSlZkkp7AuoEKnE0yudV5-kn47r8/view?usp=sharing