Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Update direction comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanLovato committed Nov 28, 2020
1 parent 82dfb3c commit af46780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dodge_the_creeps_3d/Player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit af46780

Please sign in to comment.