Skip to content

Commit cd831fd

Browse files
committed
Reference the new movement demos in our roomscale writeup
1 parent 5f5185e commit cd831fd

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tutorials/xr/xr_room_scale.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ As a developer this introduces a number of interesting challenges.
1111
In this document we will look at a number of the challenges you may face and outline some solutions.
1212
We'll discuss the issues and challenges for seated XR games in another document.
1313

14-
.. note:
14+
.. note::
1515
Often developers sit behind their desk while building the foundation to their game.
1616
In this mode the issues with developing for room scale don't show themselves until it is too late.
1717
The advice here is to start testing while standing up and walking around as early as possible.
@@ -68,6 +68,9 @@ We use this to determine where our body center is.
6868

6969
Processing our character movement is now done in three steps.
7070

71+
.. note::
72+
The `Origin centric movement demo <https://github.com/godotengine/godot-demo-projects/tree/master/xr/openxr_origin_centric_movement>`__ contains a more elaborate example of the technique described below.
73+
7174
Step 1
7275
------
7376

@@ -117,7 +120,7 @@ The second step is to handle rotation of the player as a result of user input.
117120
As the input used can differ based on your needs we are simply calling the function ``_get_rotational_input``.
118121
This function should obtain the necessary input and return the rotational speed in radians per second.
119122

120-
.. note:
123+
.. note::
121124
For our example we are going to keep this simple and straight forward.
122125
We are not going to worry about comfort features such as snap turning and applying a vignette.
123126
We highly recommend implementing such comfort features.
@@ -156,7 +159,7 @@ This function should obtain the necessary input and return the rotational speed
156159
if !is_colliding:
157160
_process_rotation_on_input(delta)
158161
159-
.. note:
162+
.. note::
160163
We've added the call for processing our rotation to our physics process but we are only executing this if we were able to move our player fully.
161164
This means that if the player moves somewhere they shouldn't, we don't process further movement.
162165

@@ -168,7 +171,7 @@ The third and final step is moving the player forwards, backwards or sideways as
168171
Just like with the rotation the inputs differ from project to project so we are simply calling the function ``_get_movement_input``.
169172
This function should obtain the necessary input and return a directional vector scaled to the required velocity.
170173

171-
.. note:
174+
.. note::
172175
Just like with rotation we're keeping it simple. Here too it is advisable to look at adding comfort settings.
173176

174177
.. code-block:: gdscript
@@ -216,6 +219,9 @@ We also have our neck helper node.
216219

217220
Processing our character movement is done in the same three steps but implemented slightly differently.
218221

222+
.. note::
223+
The `Character centric movement demo <https://github.com/godotengine/godot-demo-projects/tree/master/xr/openxr_character_centric_movement>`__ contains a more elaborate example of the technique described below.
224+
219225
Step 1
220226
------
221227

@@ -381,6 +387,9 @@ Further improvements to the code presented could be:
381387
- allowing controller input as long as this distance is still small,
382388
- still applying gravity to the player even when controller input is disabled.
383389

390+
.. note::
391+
The movement demos in our demo repository contain an example of blacking out the screen when a user walks into restricted areas.
392+
384393
Further suggestions for improvements
385394
------------------------------------
386395

0 commit comments

Comments
 (0)