UltimateXR.Manipulation Namespace


Public classUxrApplyConstraintsEventArgs Event arguments for UxrGrabbableObjectConstraintsApplying and ConstraintsApplied.
Public classUxrGrabbableObject Component that, added to a GameObject, will enable the object to be grabbed by the UxrGrabber components found in the hands of an UxrAvatar. Some of the main features of grabbable objects are:  
  • Manipulation is handled automatically by the UxrGrabManager. There is no special requirement to enable it in a scene, the grab manager will be available as soon as it is invoked.
  • Grabbable objects can be grabbed, released and placed. Releasing an object means dropping it mid-air, while placing it is releasing an object close enough to a compatible UxrGrabbableObjectAnchor.
  • Objects can be grabbed from different grab points.
  • Additionally, grab points can be expanded using UxrGrabPointShape components opening up more complex manipulation by describing grab points as composite shapes.
  • Although all avatars that have UxrGrabber components are able to interact with UxrGrabbableObject objects, it is possible to register the way specific avatars will interact with it. This allows to specify snap points and poses for different avatars and make sure that all have precise and realistic manipulation.
  • The Hand Pose Editor can create poses that are used by UxrGrabbableObject in order to tell how objects are grabbed. The inspector window will preview grab poses and enable editing them.
  • Events such as Grabbed, Released and Placed allow to write logic when a user interacts with the object. Each has pre and post events.
  • ConstraintsApplying, ConstraintsApplied and ConstraintsFinished allow to program more complex logic when grabbing objects.
Public classUxrGrabbableObjectAnchor Component that, added to a GameObject, will enable UxrGrabbableObject objects to be placed on it. Some of the main features of grabbable object anchors are:  
Public classUxrGrabbableObjectPreviewMesh Component used internally by the editor. They are added to keep track of grab pose preview meshes and delete them when the preview is no longer needed.
Public classUxrGrabbableObjectSnapTransform Component used internally by the editor. It renders grab pose meshes in the Scene Window when a grab point’s snap transform is selected and moved/rotated. It also allows to modify the blend factor in blend poses and gives access to some handy repositioning tools.
Public classUxrGrabber

Component that added to an UxrAvatar allows to interact with UxrGrabbableObject entities. Normally there are two per avatar, one on each hand. They are usually added to the hand object since it is the UxrGrabber transform where grabbable objects will be snapped to when snapping is used.

By default, the grabber transform is also used to compute distances to grabbable objects. Additional proximity transforms can be specified on the grabber so that grabbable objects can choose which one is used. This can be useful in some scenarios: In an aircraft cockpit most knobs and buttons will prefer the distance from the tip of the index finger, while bigger objects will prefer from the palm of the hand.

Public classUxrGrabManager Manager that takes care of updating all the manipulation mechanics. The manipulation system handles three main types of entities:  
Public classUxrGrabPointIndex Enables nicer formatting of the grab point this shape is bound to in the editor. It will show strings like Main, Additional 0, Additional 1… etc. because there is an CustomPropertyDrawer for this class (see GrabPointIndexDrawer).
Public classUxrGrabPointInfo 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.
Public classUxrGrabPointShape Base class to create more advanced grips (cylindrical, box…). An UxrGrabbableObject enables grabbing an object. A grabPoint inside the UxrGrabbableObject defines where and how the object will snap to the hand. Additionally, if there is an UxrGrabPointShape based component on the same object, it will “expand” the snapping from a single point to a more complex shape like a an axis, a cylinder, a box… This way an object can be picked up from many different places just by specifying a snap point and some additional properties.
Public classUxrGrabPointShapeAxisAngle Grab shape used to grab cylindrical objects. The cylinder is described by an axis and a length. It is possible to specify if the object can be grabbed in both directions or a direction only.
Public classUxrGripPoseInfo Describes how an object is grabbed. It tells the pose that will be used and how it will be snapped to the hand. The key is stored in the object, ideally we would have Dictionary(key, GripPoseInfo) but since Unity does not serialize Dictionaries we use a List(GripPoseInfo) containing the key (AvatarPrefabGuid) as well.
Public classUxrManipulationEventArgs

Event parameters for most manipulation events: UxrGrabManager:  

  UxrGrabbableObject:    UxrGrabbableObjectAnchor:  
Public classUxrManipulationSyncEventArgs Describes an event raised by the UxrGrabManager that can also be played back. This facilitates the manipulation synchronization through network.


Public interfaceIUxrGrabbable Interface for all objects that can be grabbed/manipulated using the UxrGrabManager.
Public interfaceIUxrGrabbableModifier Interface that can be implemented in components that modify a UxrGrabbableObject in the same GameObject so that the inspector shows which information is being controlled by the modifier.


Public enumerationUxrGrabbableModifierFlags Flags that represent parts in an UxrGrabbableObject that can be modified/hidden by components in the same GameObject that implement the IUxrGrabbableModifier interface.
Public enumerationUxrGrabMode What controller input we need to grab and release.
Public enumerationUxrGrabProximityMode Enumerates how the distance from a UxrGrabber to a UxrGrabbableObject can be computed.
Public enumerationUxrHandSnapDirection Enumerates the different ways snapping can be handled when grabbing an object. For constrained objects, this will always be hand to the object
Public enumerationUxrManipulationSyncEventType Enumerates the different events that can be synced for networking using UxrManipulationSyncEventArgs .
Public enumerationUxrPlacementType Enumerates the different ways a UxrGrabbableObject can transition when being placed on an UxrGrabbableObjectAnchor.
Public enumerationUxrPreviewGrabPoses Flags enumerating the different modes that can be used to preview the grab poses in the editor while an UxrGrabbableObject is selected.
Public enumerationUxrRotationConstraintMode Enumerates the ways a UxrGrabbableObject rotation can be constrained when being manipulated.
Public enumerationUxrRotationProvider Enumerates the different ways a UxrGrabbableObject with rotation constraints can be rotated while being manipulated.
Public enumerationUxrSnapReference Enumerates which transforms can be used to align a UxrGrabbableObject to a UxrGrabber
Public enumerationUxrSnapToAnchorMode Enumerates how a UxrGrabbableObject can snap to a UxrGrabbableObjectAnchor when being placed on it.
Public enumerationUxrSnapToHandMode Enumerates the ways a UxrGrabbableObject can snap to a UxrGrabber.
Public enumerationUxrTranslationConstraintMode Enumerates the ways a UxrGrabbableObject position can be constrained when being manipulated.