XRC Grab Move
Overview
This package is an implementation of the locomotion technique seen in the Gravity Sketch application. The technique, here called Grab Move, is built using Unity's XR Interaction Toolkit.
Components
Grab Move
This component contains the main logic for the Grab Move locomotion technique. It holds a reference to both controllers, and will calculate the scale, translation, and rotation to be applied to XR Origin based on the change in controllers' pose between adjacent frames.
Property | Description |
---|---|
Environment | List of game objects, representing the environment, that will be transformed the same way as XR Origin. |
Left Controller | The transform representing the left controller/hand. |
Right Controller | The transform representing the right controller/hand. |
Minimum Scale | The minimum scale value. Smaller values will be clamped. |
Maximum Scale | The maximum scale value. Larger values will be clamped. |
Grab Move Input
This component handles the user input, and calls Begin()
and End()
methods on the Grab Move component, based on the user input.
Property | Description |
---|---|
Grab Move Action | The input action property associated with activating the grab move operation. |
Grab Move Feedback
This component is responsible for generating feedback for the grab move technique, by rendering a line between the controllers, and rendering a sphere representing the technique's pivot.
Property | Description |
---|---|
Pivot Color | The color of the pivot halfway between the controllers / hands. |
Line Color | The color of the line between the controllers / hands. |
Installation instructions
To install this package, follow these steps:
- In the Unity Editor, click on Window > Package Manager
- Click the + button and choose Add package from git URL option
- Paste the URL to the package repository: https://github.com/xrcollaboratory/edu.cornell.xrc.interaction.grabmove.git in the prompt and click on Add (make sure your URL ends with ".git")
- If the repository is private, you will be asked to authenticate via your GitHub account. If you haven't been granted access to the repository you will not be able to install the package.
- The package should be installed into your project
- You can download the package samples from under the Samples tab in the Package Manager
Note: Even though the package documentation is public, several XRC packages are private and accessible only to XRC staff and students.
Requirements
This package was developed and tested using the following Unity Editor version:
- 2022.4.7f1 LTS
Dependencies: XRC Core, XR Interaction Toolkit, Input System.
Workflows
After adding the package to your project, you can add an XRC Grab Move game object to the scene by selecting the GameObject > XR Collaboratory > XRC Grab Move menu option, or right-clicking in your scene and select XR Collaboratory > XRC Grab Move. You can then set the serialized fields accordingly in the inspector, and assign an input action to activate the operation.
Samples
XRC Grab Move
A sample showcasing the XRC Grab Move implementation.