Fixed crawling enemy
This commit is contained in:
parent
f6758e1dba
commit
b7b4d03fda
4 changed files with 17 additions and 12 deletions
|
@ -19,7 +19,7 @@ func _physics_process(delta):
|
|||
floorCast.rotation_degrees = -MAX_SPEED * 10 * WALKING_DIRECTION * delta
|
||||
if floorCast.is_colliding():
|
||||
global_position = floorCast.get_collision_point()
|
||||
var normal = wallCast.get_collision_normal()
|
||||
var normal = floorCast.get_collision_normal()
|
||||
rotation = normal.rotated(deg2rad(90)).angle()
|
||||
else:
|
||||
rotation_degrees += 20 * WALKING_DIRECTION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue