XRNode3D
派生: XRAnchor3D
, XRController3D
A spatial node that has its position automatically updated by the XRServer
.
描述
This node can be bound to a specific pose of a XRPositionalTracker
and will automatically have its Node3D.transform
updated by the XRServer
. Nodes of this type must be added as children of the XROrigin3D
node.
属性
方法
bool | get_has_tracking_data ( ) const1 |
bool | get_is_active ( ) const1 |
XRPose | get_pose ( ) |
void | trigger_haptic_pulse ( action_name: String , frequency: float , amplitude: float , duration_sec: float , delay_sec: float ) |
信号
tracking_changed ( tracking: bool
)
Emitted when the tracker
starts or stops receiving updated tracking data for the pose
being tracked. The tracking
argument indicates whether the tracker is getting updated tracking data.
属性说明
StringName
pose = &"default"
void
set_pose_name ( value:StringName
)StringName
get_pose_name ( )
The name of the pose we're bound to. Which poses a tracker supports is not known during design time.
Godot defines number of standard pose names such as aim
and grip
but other may be configured within a given XRInterface
.
bool
show_when_tracked = false
Enables showing the node when tracking starts, and hiding the node when tracking is lost.
StringName
tracker = &""
void
set_tracker ( value:StringName
)StringName
get_tracker ( )
The name of the tracker we're bound to. Which trackers are available is not known during design time.
Godot defines a number of standard trackers such as left_hand
and right_hand
but others may be configured within a given XRInterface
.
方法说明
bool
get_has_tracking_data ( ) const1
Returns true
if the tracker
has current tracking data for the pose
being tracked.
Returns true
if the tracker
has been registered and the pose
is being tracked.
XRPose
get_pose ( )
Returns the XRPose
containing the current state of the pose being tracked. This gives access to additional properties of this pose.
void
trigger_haptic_pulse ( action_name: String
, frequency: float
, amplitude: float
, duration_sec: float
, delay_sec: float
)
Triggers a haptic pulse on a device associated with this interface.
action_name
is the name of the action for this pulse.
frequency
is the frequency of the pulse, set to 0.0
to have the system use a default frequency.
amplitude
is the amplitude of the pulse between 0.0
and 1.0
.
duration_sec
is the duration of the pulse in seconds.
delay_sec
is a delay in seconds before the pulse is given.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。