diff options
Diffstat (limited to 'scene/3d/arvr_nodes.h')
-rw-r--r-- | scene/3d/arvr_nodes.h | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/scene/3d/arvr_nodes.h b/scene/3d/arvr_nodes.h index 3dab263317..936519126b 100644 --- a/scene/3d/arvr_nodes.h +++ b/scene/3d/arvr_nodes.h @@ -39,7 +39,7 @@ **/ /* - ARVRCamera is a subclass of camera which will register itself with its parent ARVROrigin and as a result is automatically positioned + ARVRCamera is a subclass of camera which will register itself with its parent ARVROrigin and as a result is automatically positioned */ class ARVRCamera : public Camera { @@ -56,9 +56,9 @@ public: }; /* - ARVRController is a helper node that automatically updates it's position based on tracker data. + ARVRController is a helper node that automatically updates it's position based on tracker data. - It must be a child node of our ARVROrigin node + It must be a child node of our ARVROrigin node */ class ARVRController : public Spatial { @@ -92,6 +92,37 @@ public: }; /* + ARVRAnchor is a helper node that automatically updates it's position based on anchor data, it represents a real world location. + It must be a child node of our ARVROrigin node +*/ + +class ARVRAnchor : public Spatial { + GDCLASS(ARVRAnchor, Spatial); + +private: + int anchor_id; + bool is_active; + Vector3 size; + +protected: + void _notification(int p_what); + static void _bind_methods(); + +public: + void set_anchor_id(int p_anchor_id); + int get_anchor_id(void) const; + String get_anchor_name(void) const; + + bool get_is_active() const; + Vector3 get_size() const; + + String get_configuration_warning() const; + + ARVRAnchor(); + ~ARVRAnchor(); +}; + +/* ARVROrigin is special spatial node that acts as our origin point mapping our real world center of our tracking volume into our virtual world. It is this point that you will move around the world as the player 'moves while standing still', i.e. the player moves through teleporting or controller inputs as opposed to physically moving. |