Browse Source

Fix ray casting tutorial typo

Teggy 2 days ago
parent
commit
3cc46eb1f5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tutorials/physics/ray-casting.rst

+ 3 - 3
tutorials/physics/ray-casting.rst

@@ -298,9 +298,9 @@ To obtain it using a camera, the following code can be used:
 
 
     func _input(event):
     func _input(event):
         if event is InputEventMouseButton and event.pressed and event.button_index == 1:
         if event is InputEventMouseButton and event.pressed and event.button_index == 1:
-              var camera3d = $Camera3D
-              var from = camera3d.project_ray_origin(event.position)
-              var to = from + camera3d.project_ray_normal(event.position) * RAY_LENGTH
+            var camera3d = $Camera3D
+            var from = camera3d.project_ray_origin(event.position)
+            var to = from + camera3d.project_ray_normal(event.position) * RAY_LENGTH
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp