We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3c71dd commit be77353Copy full SHA for be77353
2d/dodge_the_creeps/main.gd
@@ -29,12 +29,12 @@ func _on_MobTimer_timeout():
29
var mob_spawn_location = get_node(^"MobPath/MobSpawnLocation")
30
mob_spawn_location.progress = randi()
31
32
- # Set the mob's direction perpendicular to the path direction.
33
- var direction = mob_spawn_location.rotation + PI / 2
34
-
35
# Set the mob's position to a random location.
36
mob.position = mob_spawn_location.position
37
+ # Set the mob's direction perpendicular to the path direction.
+ var direction = mob_spawn_location.rotation + PI / 2
+
38
# Add some randomness to the direction.
39
direction += randf_range(-PI / 4, PI / 4)
40
mob.rotation = direction
0 commit comments