0 votes

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


please see the link below to see the shifting effect:

in Engine by (250 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.