Docs: ARVRController and ARVRInterface

This commit clarifies a few methods and members in the AR/VR docs. It
also updates some wording according to the style guide and fixes a
couple typos.
This commit is contained in:
James Westman 2019-12-05 15:58:58 -06:00
parent 1b40a95b6f
commit 5978e6afac
2 changed files with 14 additions and 13 deletions

View File

@ -22,7 +22,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand"> <return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return> </return>
<description> <description>
Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker]. Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand].
</description> </description>
</method> </method>
<method name="get_is_active" qualifiers="const"> <method name="get_is_active" qualifiers="const">
@ -61,7 +61,7 @@
<argument index="0" name="button" type="int"> <argument index="0" name="button" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the button at index [code]button[/code] is pressed. Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants.
</description> </description>
</method> </method>
</methods> </methods>
@ -73,7 +73,8 @@
When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off. When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off.
</member> </member>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly.
This is a useful property to animate if you want the controller to vibrate for a limited duration.
</member> </member>
</members> </members>
<signals> <signals>

View File

@ -21,7 +21,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns a combination of flags providing information about the capabilities of this interface. Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.
</description> </description>
</method> </method>
<method name="get_name" qualifiers="const"> <method name="get_name" qualifiers="const">
@ -51,9 +51,9 @@
<description> <description>
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
[b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.
If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.
While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD.
</description> </description>
</method> </method>
<method name="is_stereo"> <method name="is_stereo">
@ -73,13 +73,13 @@
</methods> </methods>
<members> <members>
<member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false"> <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false">
On an AR interface, is our anchor detection enabled? On an AR interface, [code]true[/code] if anchor detection is enabled.
</member> </member>
<member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false"> <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false">
Has this interface been initialized? [code]true[/code] if this interface been initialized.
</member> </member>
<member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false"> <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false">
Is this our primary interface? [code]true[/code] if this is the primary interface.
</member> </member>
</members> </members>
<constants> <constants>
@ -93,10 +93,10 @@
This interface supports stereoscopic rendering. This interface supports stereoscopic rendering.
</constant> </constant>
<constant name="ARVR_AR" value="4" enum="Capabilities"> <constant name="ARVR_AR" value="4" enum="Capabilities">
This interface support AR (video background and real world tracking). This interface supports AR (video background and real world tracking).
</constant> </constant>
<constant name="ARVR_EXTERNAL" value="8" enum="Capabilities"> <constant name="ARVR_EXTERNAL" value="8" enum="Capabilities">
This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes.
</constant> </constant>
<constant name="EYE_MONO" value="0" enum="Eyes"> <constant name="EYE_MONO" value="0" enum="Eyes">
Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported.
@ -111,7 +111,7 @@
Tracking is behaving as expected. Tracking is behaving as expected.
</constant> </constant>
<constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> <constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status">
Tracking is hindered by excessive motion, player is moving faster than tracking can keep up. Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up).
</constant> </constant>
<constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> <constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status">
Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc.