UxrGrabbableObject Properties

The UxrGrabbableObject type exposes the following members.

Properties

NameDescription
Public propertyAllowMultiGrab Gets whether the object can be grabbed with more than one hand.
Public propertyControlParentDirection Gets or sets whether a dependent object can control the grabbable parent’s direction when both are being grabbed at the same time.
Public propertyCurrentAnchor Gets the UxrGrabbableObjectAnchor where the object is actually placed or null if it’s not placed on any.
Public propertyDropAlignTransform Gets the Transform that needs to align with a UxrGrabbableObjectAnchor when placing the object on it.
Public propertyDropProximityTransform Gets the Transform that will be used to compute the distance to UxrGrabbableObjectAnchor components when looking for the closest available to place it.
Public propertyDropSnapMode Gets how the object will align with a UxrGrabbableObjectAnchor when placing it.
Public propertyFirstGrabPointIsMain Gets or sets whether the first grab point in the list is the main grab in objects with more than one grab point. When an object is grabbed with both hands, the main grab controls the actual position while the secondary grab controls the direction. Set it to true in objects like a rifle, where the trigger hand should be the first grab in order to keep the object in place, and the front grab will control the aiming direction. If false, the grab point order is irrelevant and the hand that grabbed the object first will be considered as the main grab.
Public propertyGrabbableParentDependency Gets the Transform that the object is dependent on, when the grabbable object has another above in its hierarchy.
Public propertyGrabPointCount Gets the total number of grab points.
Public propertyHasGrabbableParentDependency Gets if the object has constraints and at the same time has a grabbable parent. This means that the object can either be considered as another grabbable part of the parent object or a separate grabbable object that is just attached to the parent object but has no control over it. The former are movable parts in a composite object while the latter are independent grabbable objects that happen to be in the hierarchy.
Public propertyHasRotationConstraint Gets whether the object has a rotation constraint.
Public propertyHasTranslationConstraint Gets whether the object has a translation constraint.
Public propertyHorizontalReleaseMultiplier Gets the horizontal velocity factor that will be applied to the object when being thrown.
Public propertyIgnoreGrabbableParentDependency Gets or sets whether to ignore the grabbable parent dependency. UsesGrabbableParentDependency.
Public propertyIsBeingGrabbed Gets whether the object is being grabbed.
Public propertyIsConstrained Gets whether the object has translation/rotation constraints.
Public propertyIsGrabbable Gets or sets whether the object can be grabbed.
Public propertyIsKinematic Gets or sets whether the rigidbody that drives the object (if any) is kinematic.
Public propertyIsLockedInPlace Gets or sets whether the object can be moved/rotated. A locked in place object may be grabbed but cannot be moved.
Public propertyIsPlaceable Gets or sets whether the object can be placed on an UxrGrabbableObjectAnchor.
Public propertyLimitedRangeOfMotionRotationAxes Gets the local axes that the object can rotate around with limited range of motion (not freely, nor locked).
Public propertyLockedGrabReleaseDistance Gets the distance that the real hand needs to have to the virtual hand in order for the object grip to be released automatically. This happens when a grabbed object has a range of movement and the grip is pulled too far from a valid position.
Public propertyNeedsTwoHandsToRotate Gets whether the object requires both hands grabbing it in order to rotate it.
Public propertyPriority Gets or sets the object priority. The priority is used to control which object will be grabbed when multiple objects are in reach and the user performs the grab gesture. The default behaviour is to use the distance and orientation to the objects in reach to select the one with the closest grip. The priority can override this behaviour by selecting the one with the highest priority value. By default all objects have priority 0.
Public propertyRangeOfMotionRotationAxes Gets the local axes that the object can rotate around.
Public propertyRangeOfMotionRotationAxisCount Gets the number of axes that the object can rotate around.
Public propertyRestrictToBox Gets or sets the box collider used When TranslationConstraint is RestrictToBox.
Public propertyRestrictToSphere Gets or sets the sphere collider used When TranslationConstraint is RestrictToSphere.
Public propertyRigidBodyDynamicOnRelease Gets whether the object’s RigidBodySource will be made dynamic when the object grip is released.
Public propertyRigidBodySource Specifies the rigidbody component that controls the grabbable object when it is in dynamic (physics-enabled) mode.
Public propertyRotationAngleLimitsMax Gets or sets the rotational maximum limits in local space when RotationConstraint is RestrictLocalRotation.
Public propertyRotationAngleLimitsMin Gets or sets the rotational minimum limits in local space when RotationConstraint is RestrictLocalRotation.
Public propertyRotationConstraint Gets or sets the rotation constraint type.
Public propertyRotationLongitudinalAxis Gets or sets which one is the longitudinal axis (x, y or z) in a rotation with constraints on two or more axes.
Public propertyRotationProvider Gets or sets the rotation provider. The rotation provider is used in objects with constrained position to know which element drives the rotation.
Public propertyRotationResistance Gets or sets the resistance to the object being rotated. This can be used to smooth out the rotation but also to simulate heavy objects.
Public propertySingleRotationAxisDegrees Gets or sets the rotation angle in degrees for objects that have a single rotational degree of freedom.
Public propertySingleRotationAxisIndex Gets the index of the rotation axis if the object can only rotate around that single axis. Will return any of these values: (x = 0, y = 1, z = 2, none or more than one = -1).
Public propertyStartAnchor Gets the starting UxrGrabbableObjectAnchor the object is placed on.
Public propertyTag String that identifies which UxrGrabbableObjectAnchor components are compatible for placement. A UxrGrabbableObject can be placed on an UxrGrabbableObjectAnchor only if:  
Public propertyTranslationConstraint Gets or sets the translation constraint.
Public propertyTranslationLimitsMax Gets or sets the translation maximum limits in local space when TranslationConstraint is RestrictLocalOffset.
Public propertyTranslationLimitsMin Gets or sets the translation minimum limits in local space when TranslationConstraint is RestrictLocalOffset.
Public propertyTranslationResistance Gets or sets the resistance to the object being moved around. This can be used to smooth out the position but also to simulate heavy objects.
Public propertyUseParenting Gets or sets whether to parent the object to the UxrGrabbableObjectAnchor being placed. Also whether to set the parent to null when grabbing the object from one.
Public propertyUsesGrabbableParentDependency

Gets whether the object has a parent dependency (HasGrabbableParentDependency is true) and is using it through _ignoreGrabbableParentDependency in the inspector.

When a grabbable object that has position/rotation constraints hangs from a hierarchy where another grabbable object is somewhere above, the child grabbable object can either be:  

  • Dependent (_ignoreGrabbableParentDependency is false): The object is considered as another part of the parent grabbable object. It will be constrained by its parent object and can optionally also control the parent’s direction when both are being grabbed.
  • Independent (_ignoreGrabbableParentDependency is true): The object is considered as a separate entity where it just happens to be placed under the hierarchy.
Public propertyVerticalReleaseMultiplier Gets the vertical velocity factor that will be applied to the object when being thrown.

See Also

Reference

UxrGrabbableObject Class
UltimateXR.Manipulation Namespace