General proofreading (#1262)

* General proofreading for grammar and spelling
* General formatting
* Addition of appropriate literals where appropriate, i.e. `&"foo"` for `StringName` cases and `^"foo/bar"` for `NodePath` cases
This commit is contained in:
A Thousand Ships
2025-10-11 10:39:59 +02:00
committed by GitHub
parent a01005f397
commit 0343cedd48
180 changed files with 721 additions and 692 deletions

View File

@@ -1,6 +1,6 @@
# XR Origin Centric Movement demo
This is a demo for an OpenXR project where player movement is handled with a XRorigin3D as a base node.
This is a demo for an OpenXR project where player movement is handled with an XRorigin3D as a base node.
This is based on the [Origin centric solution as explained in the room scale manual page](https://docs.godotengine.org/en/stable/tutorials/xr/xr_room_scale.html#origin-centric-solution).
Language: GDScript

View File

@@ -14,7 +14,7 @@ func _update_fade() -> void:
$MeshInstance3D.visible = false
else:
if material:
material.set_shader_parameter("albedo", Color(0.0, 0.0, 0.0, fade))
material.set_shader_parameter(&"albedo", Color(0.0, 0.0, 0.0, fade))
$MeshInstance3D.visible = true

View File

@@ -42,17 +42,19 @@ func recenter() -> void:
# Recenter character body.
character_body.transform = Transform3D()
# `_get_movement_input()` returns our move input by querying the move action on each controller.
func _get_movement_input() -> Vector2:
var movement : Vector2 = Vector2()
# If move is not bound to one of our controllers,
# that controller will return `Vector2.ZERO`.
movement += $LeftHand.get_vector2("move")
movement += $RightHand.get_vector2("move")
movement += $LeftHand.get_vector2(&"move")
movement += $RightHand.get_vector2(&"move")
return movement
# `_process_on_physical_movement` handles the physical movement of the player
# adjusting our character body position to "catch up to" the player.
# If the character body encounters an obstruction our view will black out