UltimateXR.Manipulation Namespace
Classes
Class | Description | |
---|---|---|
UxrApplyConstraintsEventArgs | Event arguments for UxrGrabbableObjectConstraintsApplying and ConstraintsApplied. | |
UxrGrabbableObject |
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:
| |
UxrGrabbableObjectAnchor |
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:
| |
UxrGrabbableObjectPreviewMesh | 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. | |
UxrGrabbableObjectSnapTransform | 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. | |
UxrGrabber |
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. | |
UxrGrabManager |
Manager that takes care of updating all the manipulation mechanics. The manipulation system handles three main types of entities:
| |
UxrGrabPointIndex | 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). | |
UxrGrabPointInfo | 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. | |
UxrGrabPointShape | 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. | |
UxrGrabPointShapeAxisAngle | 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. | |
UxrGripPoseInfo | 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. | |
UxrManipulationEventArgs |
Event parameters for most manipulation events: UxrGrabManager:
| |
UxrManipulationSyncEventArgs | Describes an event raised by the UxrGrabManager that can also be played back. This facilitates the manipulation synchronization through network. |
Interfaces
Interface | Description | |
---|---|---|
IUxrGrabbable | Interface for all objects that can be grabbed/manipulated using the UxrGrabManager. | |
IUxrGrabbableModifier | 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. |
Enumerations
Enumeration | Description | |
---|---|---|
UxrGrabbableModifierFlags | Flags that represent parts in an UxrGrabbableObject that can be modified/hidden by components in the same GameObject that implement the IUxrGrabbableModifier interface. | |
UxrGrabMode | What controller input we need to grab and release. | |
UxrGrabProximityMode | Enumerates how the distance from a UxrGrabber to a UxrGrabbableObject can be computed. | |
UxrHandSnapDirection | Enumerates the different ways snapping can be handled when grabbing an object. For constrained objects, this will always be hand to the object | |
UxrManipulationSyncEventType | Enumerates the different events that can be synced for networking using UxrManipulationSyncEventArgs . | |
UxrPlacementType | Enumerates the different ways a UxrGrabbableObject can transition when being placed on an UxrGrabbableObjectAnchor. | |
UxrPreviewGrabPoses | Flags enumerating the different modes that can be used to preview the grab poses in the editor while an UxrGrabbableObject is selected. | |
UxrRotationConstraintMode | Enumerates the ways a UxrGrabbableObject rotation can be constrained when being manipulated. | |
UxrRotationProvider | Enumerates the different ways a UxrGrabbableObject with rotation constraints can be rotated while being manipulated. | |
UxrSnapReference | Enumerates which transforms can be used to align a UxrGrabbableObject to a UxrGrabber | |
UxrSnapToAnchorMode | Enumerates how a UxrGrabbableObject can snap to a UxrGrabbableObjectAnchor when being placed on it. | |
UxrSnapToHandMode | Enumerates the ways a UxrGrabbableObject can snap to a UxrGrabber. | |
UxrTranslationConstraintMode | Enumerates the ways a UxrGrabbableObject position can be constrained when being manipulated. |