We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc4cc37 commit 8debbc2Copy full SHA for 8debbc2
getting_started/first_2d_game/05.the_main_game_scene.rst
@@ -202,12 +202,12 @@ Note that a new instance must be added to the scene using ``add_child()``.
202
var mob_spawn_location = $MobPath/MobSpawnLocation
203
mob_spawn_location.progress_ratio = randf()
204
205
+ # Set the mob's position to the random location.
206
+ mob.position = mob_spawn_location.position
207
+
208
# Set the mob's direction perpendicular to the path direction.
209
var direction = mob_spawn_location.rotation + PI / 2
210
- # Set the mob's position to a random location.
- mob.position = mob_spawn_location.position
-
211
# Add some randomness to the direction.
212
direction += randf_range(-PI / 4, PI / 4)
213
mob.rotation = direction
0 commit comments