XROrigin3D

继承: Node3D < Node < Object

The origin point in AR/VR.

描述

This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world.

Multiple origin points can be added to the scene tree, but only one can used at a time. All the XRCamera3D, XRController3D, and XRAnchor3D nodes should be direct children of this node for spatial tracking to work correctly.

It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point.

For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.

属性


属性说明

bool current = false

  • void set_current ( value: bool )
  • bool is_current ( )

If true, this origin node is currently being used by the XRServer. Only one origin point can be used at a time.


float world_scale = 1.0

  • void set_world_scale ( value: float )
  • float get_world_scale ( )

The scale of the game world compared to the real world. This is the same as XRServer.world_scale. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter.

1

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

2

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

3

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

4

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

5

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

6

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

7

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

8

无返回值。