immersive-home/app/addons/godot-xr-tools/objects/hand_pose_area.gd

38 lines
979 B
GDScript3
Raw Normal View History

2023-10-16 20:10:20 +03:00
@tool
@icon("res://addons/godot-xr-tools/editor/icons/hand.svg")
class_name XRToolsHandPoseArea
extends Area3D
## XR Tools Hand Pose Area
##
## This area works with the XRToolsFunctionPoseArea to control the pose
## of the VR hands.
## Priority level for this hand pose area
@export var pose_priority : int
## Left hand pose settings (XRToolsHandPoseSettings)
@export var left_pose : XRToolsHandPoseSettings
## Right hand pose settings (XRToolsHandPoseSettings)
@export var right_pose : XRToolsHandPoseSettings
2023-12-14 01:03:03 +02:00
## Array of grabpoints this hand pose area disables when active
@export var grabpoints : Array[XRToolsGrabPointHand]
2023-10-16 20:10:20 +03:00
# Add support for is_xr_class on XRTools classes
func is_xr_class(name : String) -> bool:
return name == "XRToolsHandPoseArea"
2023-12-14 01:03:03 +02:00
# Disables grabpoints
func disable_grab_points():
for grabpoint in grabpoints:
grabpoint.enabled = false
# Enables grabpoints
func enable_grab_points():
for grabpoint in grabpoints:
grabpoint.enabled = true