diff --git a/2d/dodge_the_creeps/main.gd b/2d/dodge_the_creeps/main.gd index b59b1b28..3e8cf2f8 100644 --- a/2d/dodge_the_creeps/main.gd +++ b/2d/dodge_the_creeps/main.gd @@ -29,12 +29,12 @@ func _on_MobTimer_timeout(): var mob_spawn_location = get_node(^"MobPath/MobSpawnLocation") mob_spawn_location.progress = randi() - # Set the mob's direction perpendicular to the path direction. - var direction = mob_spawn_location.rotation + PI / 2 - # Set the mob's position to a random location. mob.position = mob_spawn_location.position + # Set the mob's direction perpendicular to the path direction. + var direction = mob_spawn_location.rotation + PI / 2 + # Add some randomness to the direction. direction += randf_range(-PI / 4, PI / 4) mob.rotation = direction