Grab Points
Introduction
Grab Points can be added to Pickable objects to control where the pickable object will be held by the players hands, or snapped into snap-zones.
Setup
The following shows a teacup with grab points attached:
The three types of grab-points supported are:
- GrabPointHandLeft - objects/grab_points/grab_point_hand_left.tscn
- GrabPointHandRight - objects/grab_points/grab_point_hand_right.tscn
- GrabPointSnap - objects/grab_points/grab_point_snap.tscn
Hand Grab Points
Hand grab-points can be configured with custom hand poses, and the editor will preview the hand in the open or closed pose to help the alignment process. To view the hand toggle the visibility option in the scene tree for the hand grab point.
The following shows the hand grab-point configuration options:
Changing the Editor Preview Mode has no effect on the game and is just used to help the alignment process.
Snap-Zone Grab Points
Snap-zone grab-points can be configured to control which snap-zones the object can be snapped into, and the orientation when snapping. To view the snap-zone alignment helper, toggle the visibility option in the scene tree for the snap-zone grab point.
The following shows the snap-zone grab-point configuration options:
The standard approach to controlling which snap-zone grab-points work with which snap-zones is to use groups. The example above has a snap-zone grab-point which is supposed to be for the teacup stand. This is achieved by:
- Add the teacup stand snap-zone to the “TeacupStand” group
- Set the snap-zone grab-point require group to “TeacupStand”.
Configuration
XRToolsGrabPointHand
Property | Description |
---|---|
Enabled | When enabled, the object can be picked up by this grab-point |
Handle | Name for the handle (to prevent multiple grabs on the same logical handle) |
Hand | Which hand this hand-grab-point is configured for. |
Mode | Type of grab that can be performed at this point (primary, secondary, general) |
Snap Hand | When checked, the hand model snaps to the grab-point when grabbed |
Hand Pose | XRToolsHandPoseSettings to apply when holding an object by this grab-point |
Editor Preview Mode | Mode for the preview hand in the editor. |
Drive Position | When two-handed grabbing, controls how much this grab drives position |
Drive Angle | When two-handed grabbing, controls how much this grab drives angle |
Drive Aim | When two-handed grabbing, controls how much this grab drives aim |
XRToolsGrabPointSnap
Property | Description |
---|---|
Enabled | When enabled, the object can be snapped by this grab-point |
Require Group | Optional name of a group the object requires the snap-zone to be in |
Exclude Group | Optional name of a group the object refuses the snap-zone to be in |
Additional Resources
The following videos show the creation of a basic XR Player with pickup and grab-points:
- Previous
- Next