UxrGrabPointInfo Class
Defines a UxrGrabbableObject grab point. A grab point describes a point of an object which can be grabbed. Objects can have multiple grab points to allow it to be grabbed from different angles. Grab points can be further expanded by using a UxrGrabPointShape, which gives flexibility by allowing it to be grabbed around or along an axis passing through that point, for example.
Inheritance Hierarchy
System.Object
UltimateXR.Manipulation.UxrGrabPointInfo
Namespace: UltimateXR.Manipulation
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
[SerializableAttribute]
public class UxrGrabPointInfo
The UxrGrabPointInfo type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UxrGrabPointInfo |
Properties
Name | Description | |
---|---|---|
AlignToController | Gets or sets whether to align the grab to the controller axes, useful when grabbing objects that require aiming, such as weapons. | |
AlignToControllerAxes | Gets or sets the transform in the grabbable object to use that will align to the controller axes (x = right, y = up, z = forward). | |
AvatarGripPoseEntries | Gets the registered avatars for specific grip poses and properties. | |
BothHandsCompatible | Gets or sets whether both hands are compatible with the grab point. | |
DefaultGripPoseInfo | Gets or sets the default grip pose info, which is the grip pose info used when an avatar interacts with an object and is not registered to have specific properties. | |
EditorName | Gets or sets the grab point display name in the inspector. | |
EnableOnHandNear | Gets or sets the GameObject to enable or disable when the object is grabbed or not using the grab point. | |
GrabberProximityIndex | Gets or sets which additional proximity transform from UxrGrabber to use when GrabberProximityUseDefault is false. | |
GrabberProximityTransformIndex | Gets the UxrGrabber proximity index used to compute the distance to the object. -1 for default (the grabber itself) or any other value for additional transforms in the UxrGrabber component. | |
GrabberProximityUseDefault | Gets or sets whether to use the UxrGrabber transform when computing the distance to the grab point. Otherwise it can specify additional proximity transforms using GrabberProximityIndex. | |
GrabMode | Gets or sets the grab mode. | |
GrabProximityBox | Gets or sets the box collider used when GrabProximityMode is BoxConstrained. | |
GrabProximityMode | Gets or sets the proximity mode to use. | |
GrabProximityTransform | Gets or sets the Transform that will be used to compute the distance to UxrGrabber components when GrabberProximityUseDefault is false. | |
GrabProximityTransformUseSelf | Gets or sets whether to use the own UxrGrabbableObject transform when computing the distance to UxrGrabber components. | |
GripPoseInfoCount | Gets how many grip pose entries there are. 1 (the default grip pose info) plus all the registered avatar ones. | |
HandSide | If BothHandsCompatible is false, tells which hand is used to grab the object using the grab point. | |
HideHandGrabberRenderer | Gets or sets whether to hide the hand while it is grabbing the object using the grab point. | |
InputButtons | If UseDefaultGrabButtons is false, tells which buttons are used to grab the object using the grab point. | |
IsEditorFoldedOut | Gets or sets whether foldout control for a given grab point is folded out or not. We use this in the editor to check if we need to render the preview grab pose meshes for a given grab point. Grab points that are not folded out are not rendered. | |
MaxDistanceGrab | Gets or sets the maximum distance the object can be grabbed using this the grab point. | |
SnapDirection | Gets or sets whether the object will snap to the hand or the hand will snap to the object when it is grabbed using the grab point. Only used when any kind of snapping is enabled. | |
SnapMode | Gets or sets how the object will snap to the hand when it is grabbed using the grab point. | |
SnapReference | Gets or sets which reference to use for snapping when the object is grabbed using the grab point. | |
UseDefaultGrabButtons | Gets or sets whether to use the default grab buttons to grab the object using the grab point. |
Methods
Name | Description | |
---|---|---|
CheckAddGripPoseInfo | Checks whether to create a grip pose entry for the given avatar prefab. | |
GetCompatibleGripPoseInfos | Gets all the grip pose infos that can be used with the given avatar. | |
GetGripPoseInfo(Int32) | Gets a given grip pose info entry. | |
GetGripPoseInfo(String) | Gets a given grip pose info entry. | |
GetGripPoseInfo(UxrAvatar, Boolean) | Gets the grip pose info for the given avatar instance or prefab. | |
RemoveGripPoseInfo | Removes the grip pose entry of a given avatar prefab. |
Extension Methods
Name | Description | |
---|---|---|
ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |