how to use move_and_slide on a rotating platform?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By icqqq

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 see the link below to see the shifting effect: