Had an issue where my KinematicBody2D
would only collide with StaticBody2D
s 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:
https://docs.godotengine.org/en/stable/classes/class_kinematicbody2d.html