Browse Source

fix comment

Comment was inaccurate in its conversion of radians to degrees
akpath 1 year ago
parent
commit
84db963c74
1 changed files with 2 additions and 2 deletions
  1. 2 2
      getting_started/first_3d_game/04.mob_scene.rst

+ 2 - 2
getting_started/first_3d_game/04.mob_scene.rst

@@ -163,7 +163,7 @@ between ``-PI / 4`` radians and ``PI / 4`` radians.
         # We position the mob by placing it at start_position
         # We position the mob by placing it at start_position
         # and rotate it towards player_position, so it looks at the player.
         # and rotate it towards player_position, so it looks at the player.
         look_at_from_position(start_position, player_position, Vector3.UP)
         look_at_from_position(start_position, player_position, Vector3.UP)
-        # Rotate this mob randomly within range of -90 and +90 degrees,
+        # Rotate this mob randomly within range of -45 and +45 degrees,
         # so that it doesn't move directly towards the player.
         # so that it doesn't move directly towards the player.
         rotate_y(randf_range(-PI / 4, PI / 4))
         rotate_y(randf_range(-PI / 4, PI / 4))
 
 
@@ -175,7 +175,7 @@ between ``-PI / 4`` radians and ``PI / 4`` radians.
         // We position the mob by placing it at startPosition
         // We position the mob by placing it at startPosition
         // and rotate it towards playerPosition, so it looks at the player.
         // and rotate it towards playerPosition, so it looks at the player.
         LookAtFromPosition(startPosition, playerPosition, Vector3.Up);
         LookAtFromPosition(startPosition, playerPosition, Vector3.Up);
-        // Rotate this mob randomly within range of -90 and +90 degrees,
+        // Rotate this mob randomly within range of -45 and +45 degrees,
         // so that it doesn't move directly towards the player.
         // so that it doesn't move directly towards the player.
         RotateY((float)GD.RandRange(-Mathf.Pi / 4.0, Mathf.Pi / 4.0));
         RotateY((float)GD.RandRange(-Mathf.Pi / 4.0, Mathf.Pi / 4.0));
     }
     }