mirror of
https://github.com/godotengine/godot-3d-dodge-the-creeps.git
synced 2026-01-04 18:10:17 +03:00
Update direction comparison
This commit is contained in:
@@ -25,7 +25,7 @@ func _physics_process(delta):
|
||||
if Input.is_action_pressed("move_forward"):
|
||||
direction.z -= 1
|
||||
|
||||
if direction.length() > 0:
|
||||
if direction != Vector3.ZERO:
|
||||
# In the lines below, we turn the character when moving and make the animation play faster.
|
||||
direction = direction.normalized()
|
||||
$Pivot.look_at(translation + direction, Vector3.UP)
|
||||
|
||||
Reference in New Issue
Block a user