IUxrGrabbable Interface
Interface for all objects that can be grabbed/manipulated using the UxrGrabManager.
Namespace: UltimateXR.Manipulation
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public interface IUxrGrabbable
The IUxrGrabbable type exposes the following members.
Properties
Name | Description | |
---|---|---|
gameObject | Gets the associated GameObject. Since all components that implement the interface will be assigned to GameObjects, this allows to access them using the interface. It doesn’t follow the property PascalCase naming to make it compatible with Unity. | |
IsBeingGrabbed | Gets whether the object is being grabbed. | |
IsGrabbable | Gets or sets whether the object can be grabbed. | |
IsKinematic | Gets or sets whether the rigidbody that drives the object (if any) is kinematic. | |
transform | Gets the associated Transform component. Since all components that implement the interface will be assigned to GameObjects, this allows to access their transform using the interface. It doesn’t follow the property PascalCase naming to make it compatible with Unity. |
Methods
Name | Description | |
---|---|---|
ReleaseGrabs | Releases the object from all its grabs if there are any. | |
ResetPositionAndState | Resets the object to its initial position/rotation and state. If the object is currently being grabbed, it will be released. |
Events
Name | Description | |
---|---|---|
Grabbed | Event called right after the object was grabbed. The grab event parameters use the same values as Grabbing. | |
Grabbing |
Event called when the object is about to be grabbed. The following properties from UxrManipulationEventArgs will contain meaningful data:
| |
Placed | Event called right after the object was placed. An object is placed when the last grip is released and there is a compatible UxrGrabbableObjectAnchor near enough to place it on. The grab event parameters use the same values as Placed. | |
Placing |
Event called when the object is about to be placed. An object is placed when the last grip is released and there is a compatible UxrGrabbableObjectAnchor near enough to place it on. The following properties from UxrManipulationEventArgs will contain meaningful data:
| |
Released | Event called right after the object was released. An object is released when the last grip is released and there is no compatible UxrGrabbableObjectAnchor near enough to place it on. The grab event parameters use the same values as Releasing. | |
Releasing |
Event called when the object is about to be released. An object is released when the last grip is released and there is no compatible UxrGrabbableObjectAnchor near enough to place it on. The following properties from UxrManipulationEventArgs will contain meaningful data:
|