Godot 2DKinematicObject Only Colliding in One Direction

Had an issue where my KinematicBody2D would only collide with StaticBody2Ds in one direction. Tried switching one-way collisions on and off. Nothing. Tried changing collision shape to concave. Nothing.

I was an idiot and had my collision logic doing the following:

collision = move_and_collide(velocity)
velocity *= collision.normal

Instead I needed to use the bounce method on the KinematicBody2D. As follows:

collision = move_and_collide(velocity)
velocity = bounce()

More Info:


comments powered by Disqus