Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | 9BitStrider | |
Old Version | Published before Godot 3 was released. |
if is_colliding():
var normal = get_collision_normal()
var final_move = normal.slide(move_remainder)
speed = normal.slide(speed)
move(final_move)
if normal == Vector2(0, -1):
jump_count = 0
Is there a way to stabilize a sprite as it collides with obstacles? I can move the sprite just fine on the play field, but when it bumps up against walls or floors it either tends to bounce at random or fidget back and forth.
I’m using a tileset for the obstacles in 8x8 pieces. Could that be a problem?