Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | fpicoral |
Guys, I’m trying to migrate a project from 3.0.6 to 3.1.beta2 but I’m having a litte problem:
My game is a plataform game 2D and I use the following code to apply the gravity (the fall
function its called on _physics_process(delta)
:
func fall(delta):
if is_on_floor() or is_on_ceiling():
motion.y = 0
else:
motion.y += GRAVITY * delta
It works fine on 3.0.6 but not in 3.1.beta2. In 3.1, when the player colides with a ceiling, he gets stuck in tge ceiling.
I even tried removing the motion.y = 0
but doesn’t really matter the motion.y value, if the player touches the ceiling, he will get stuck.
If you want to try in your computer, here is the project on GitHub