rig - eisclimber/ExPresS-XR GitHub Wiki
Classes regarding the player's XR rig.
| Name | Description |
|---|---|
| AutoHandModel | The Auto Hand Model detects and displays the currently used controller as well as providing an optional animated hand model. |
| It is used to represent the hand/controller of the XR Rig. |
There are in total four versions, two for for the for each hand, one having collisions and one doesn't.| |ConfigData|Object containing all necessary references for configuration.| |ControllerInputActionManagerBase|Use this class to mediate the interactors for a controller under different interaction states and the input actions used by them.| |ExPresSXRRig|The main configurable GameObject for XR, having all necessary components for any form of interaction as children of this one GameObject.
The rig supports three different types of input methods:
- Controller: Used with a complete VR Headset and controllers. Using this allows for the most immersive XR experience.
- Head Gaze: Used with for Smartphone applications but also compatible with VR headsets without requiring controllers.
- Eye Gaze: Used with for Smartphone applications but also compatible with VR headsets without requiring controllers. (As we do not have a compatible headset we are unable to test it. It is included as it is part of Unity's samples and was not changed by ExPresS XR.)
Movement is dependent on the pselected Input Method. While Head- and Eye-Gaze only allow for teleportation or no movement, there are the following possibilities when using controllers:
- Teleportation: Casts a ray and teleports the rig to the target position of the ray. At the end of the ray is a visual indicator (reticle) that highlight teleportation targets. These targets are defined by the GameObjects with a
TeleportationArea- andTeleportationAnchor-Component. Note: In case of HeadGaze the ray will not be rendered, only the reticle will be shown. The reticles must be added to the teleportation areas and anchors as otherwise they will be shown with all interactions). - Continuous Move: Moves the rig continuous as if the user would move in a video game. This might cause motion sickness for some people!
- Continuous Turn: Turns the rig continuous in the direction the direction the joystick was moved. This can not be combined with Snap Turn and is usually paired with Continuous Move.
- Snap Turn: Turns the rig in 45 degree (can be changed) steps in the direction the joystick was moved. This can not be combined with Continuous Turn and is usually paired with Teleportation.
- (Single Hand) Grab Motion: Users can grab the air and pull the world towards them.
- (Two Handed) Grab Motion / Grab Manipulation: Expansion of "Single Hand Grab Motion"-Movement but both controllers can be used together to rotate and scale the environment.
- No Movement: If nothing is enabled the rig won't move, but the whole rig itself can still be moved externally.
These movement options can be configured by selecting one of the rig's Movement Presets. Per default the controls are split between hands in a way known from gamepads or most common VR games (e.g. turn with the right joystick and move with the left). For a detailed description on the controls please check the docs at Workflow/MovementAndControls.md.
Choosing Custom allows for full control over the underlying HandControllers to create a custom behavior.
The application will be rendered directly to the VR headset via Unity's XROrigin. There is an additional (UI-)Camera for rendering anything that should be rendered as overlay, most commonly the some sort of HUD.
It is also possible to create and save a custom XR Rig as a prefab.
After editing an XR Rig to you your likings the Save as Custom XR Rig-Button in the inspector can be pressed.
This will save (and override) the Custom XR Rig making it instantiable via ExPresS XR/XR Rig/Custom (Saved).
Hint: For further descriptions of the components have a look at the documentation of the properties in this document, the components from ExPresS XR and Unity XR.|
|HandControllerManager|A manager for the different interaction components a hand.
This includes managing teleport, hand visuals and poke interaction.|
|HandMenuToggler|Allows controlling the visibility of a hand menu and where it is attached to (left or right hand).|
|HandPointerArea|Defines an area that triggers a pointing gesture of an AutoHandModel when entering.|
|HeadGazeController|Wraps an XRRayInteractor to be able to interact within the VR without controllers only by focusing the head's direction on an interactable object.
It is recommended to only use UI and teleportation interactions with this controller as there is no way of physically interacting with or holding onto objects.
Interactions are performed by focusing the head on an interactable object for the duration of timeToSelect. During this time the HeadGazeReticle will be shown to give a visual indication of the existence and progress of an interaction.
To cancel or reset an active interaction the head can be moved which will also hide the reticle.
Unity's input system requires an input device to create a InputAction that can be interpreted as a select action for the Action Base XR Origin.
This is done via a "fake" InputDevice the "HeadGazeInputDevice" and the "HeadGazeSelect"-InputAction. For testing purposes, the InputAction also supports triggering it via the Mouse Forward/Button 4 and the enter key on your keyboard. For this to work you'll need to have your game focussed and a mouse/keyboard must be connected. So this option might not be available with your setup.|
|PlayerHeadCollider|Detects collisions of an ExPresS XR Rigs camera.
It can optionally push the rig back to prevent clipping inside objects (this may be weird though) and/or display vignette effect of an ScreenCollisionIndicator when collisions occur.|
|RigConfigurator|Acts as a central location from which the player can teleport to other locations. This is especially useful if the other locations are far away or there is no line of sight, as regular teleports would not be possible in this case.
It provides functionality to hide/show certain objects when teleporting or the player is not present.
You will usually want to add a PlayerDetector control SetPlayerPresent() with its Events. Otherwise the visibility of _playerPresentVisibleand its children will not be affected.
The default prefab also allows teleportation at the MapPoint itself, indicated by the white are on the floor.|
|ScalingRayInteractor|Allows ray interactions with XRInteractables whilst also allowing them to be scaled, if they were configured as a ExPresSXRInteractable.
Uses the RayInteractors anchorControl-Mode to de-/activate scaling or translation.
The differentiation for anchorControl and scaling is handled via the anchorControlMode.|
|VirtualHandAnimator|Animates a virtual hand, controlling pinch(=trigger), grip and point.|
| Name | Description |
|---|---|
| AnchorControlMode | Determines how the anchorControl/scaling InputActions (Joystick up/down) are handled. |
| HandModelMode | How the hands are represented. |
| InputMethod | How the player provides input to the rig. |
| InteractionOptions | Options for configuring available interactions. |
| MovementOptions | Options for configuring optional movement features. |
| MovementPreset | Preset for common movement types of the rig. |
| Name | Description |
|---|---|
| ExPresSXR.Rig.HeadGazeInputDevice | Classes regarding player input with head gaze controls. |
| ExPresSXR.Rig.InverseKinematics | Classes for representing the player's body via inverse kinematics. |