mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-07 00:10:09 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user