OpenXRHand

已弃用: Use XRHandModifier3D instead.

继承: Node3D < Node < Object

Node supporting hand and finger tracking in OpenXR.

描述

This node enables OpenXR's hand tracking functionality. The node should be a child node of an XROrigin3D node, tracking will update its position to the player's tracked hand Palm joint location (the center of the middle finger's metacarpal bone). This node also updates the skeleton of a properly skinned hand or avatar model.

If the skeleton is a hand (one of the hand bones is the root node of the skeleton), then the skeleton will be placed relative to the hand palm location and the hand mesh and skeleton should be children of the OpenXRHand node.

If the hand bones are part of a full skeleton, then the root of the hand will keep its location with the assumption that IK is used to position the hand and arm.

By default the skeleton hand bones are repositioned to match the size of the tracked hand. To preserve the modeled bone sizes change bone_update to apply rotation only.

属性


枚举

enum Hands:

Hands HAND_LEFT = 0

Tracking the player's left hand.

Hands HAND_RIGHT = 1

Tracking the player's right hand.

Hands HAND_MAX = 2

Maximum supported hands.


enum MotionRange:

MotionRange MOTION_RANGE_UNOBSTRUCTED = 0

When player grips, hand skeleton will form a full fist.

MotionRange MOTION_RANGE_CONFORM_TO_CONTROLLER = 1

When player grips, hand skeleton conforms to the controller the player is holding.

MotionRange MOTION_RANGE_MAX = 2

Maximum supported motion ranges.


enum SkeletonRig:

SkeletonRig SKELETON_RIG_OPENXR = 0

An OpenXR compliant skeleton.

SkeletonRig SKELETON_RIG_HUMANOID = 1

A SkeletonProfileHumanoid compliant skeleton.

SkeletonRig SKELETON_RIG_MAX = 2

Maximum supported hands.


enum BoneUpdate:

BoneUpdate BONE_UPDATE_FULL = 0

The skeletons bones are fully updated (both position and rotation) to match the tracked bones.

BoneUpdate BONE_UPDATE_ROTATION_ONLY = 1

The skeletons bones are only rotated to align with the tracked bones, preserving bone length.

BoneUpdate BONE_UPDATE_MAX = 2

Maximum supported bone update mode.


属性说明

BoneUpdate bone_update = 0

Specify the type of updates to perform on the bone.


Hands hand = 0

  • void set_hand ( value: Hands )
  • Hands get_hand ( )

Specifies whether this node tracks the left or right hand of the player.


NodePath hand_skeleton = NodePath("")

Set a Skeleton3D node for which the pose positions will be updated.


MotionRange motion_range = 0

Set the motion range (if supported) limiting the hand motion.


SkeletonRig skeleton_rig = 0

Set the type of skeleton rig the hand_skeleton is compliant with.

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。