Skip to content

Commit

Permalink
Merge pull request #81967 from Jordyfel/physics-doc
Browse files Browse the repository at this point in the history
Fix example in gravity project settings doc
  • Loading branch information
akien-mga committed Sep 20, 2023
2 parents 3cce730 + 197d57a commit 0c71c7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2117,11 +2117,11 @@
[codeblocks]
[gdscript]
# Set the default gravity strength to 9.8.
PhysicsServer3D.area_set_param(get_viewport().find_world().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8)
PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8)
[/gdscript]
[csharp]
// Set the default gravity strength to 9.8.
PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8);
PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8);
[/csharp]
[/codeblocks]
</member>
Expand All @@ -2131,11 +2131,11 @@
[codeblocks]
[gdscript]
# Set the default gravity direction to `Vector3(0, -1, 0)`.
PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN)
PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN)
[/gdscript]
[csharp]
// Set the default gravity direction to `Vector3(0, -1, 0)`.
PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down)
PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down)
[/csharp]
[/codeblocks]
</member>
Expand Down

0 comments on commit 0c71c7c

Please sign in to comment.