Moving platform (elevator) is not working

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

I am workin on a slouls like game, and yesterday I tried to create an elevator to a dungeon. My caracter is a KinemyticBody3D and when the elevetor goes down, because of the gravity, the Player just hopping on the surface. I kind of know, how to solve it, but I am not sure, that it is the good way. So when the Player is standing on the elevator, it becomes th e child of the elevator. Else the Player will be free. Is it a good way, and how should I do it?

:bust_in_silhouette: Reply From: Inces

I believe you should still use gravity and collision. Childing player to elevator is major interference of scene tree structure and You will surely encounter major bugs later on. Your player is hopping because of your movement code. You must have coded the animation to change when velocity.y points upwards. Make solid conditions for jumping and falling state, that will actually be true only when player is really jumping by its own force or falling when jump force is depleted. Physics engine will allow to push your player up by normal collision behavior.