Node that is automatically positioned in world space based on an ARCore Anchor.
When the Anchor isn't tracking, all children of this node are disabled.
Public Constructors
* | |
* |
Public Methods
Anchor | |
boolean | isSmoothed
()
Returns true if the transformations are interpolated or false if they are applied immediately.
|
boolean | |
void | |
void | |
void | setLocalPosition
( Vector3
position)
Set the local-space position of this node if it is not anchored.
|
void | setLocalRotation
( Quaternion
rotation)
Set the local-space rotation of this node if it is not anchored.
|
void | setSmoothed
(boolean smoothed)
Set true to smooth the transition between the nodeâs current position and the anchor position.
|
void | setWorldPosition
( Vector3
position)
Set the world-space position of this node if it is not anchored.
|
void | setWorldRotation
( Quaternion
rotation)
Set the world-space rotation of this node if it is not anchored.
|
Inherited Methods
Public Constructors
public AnchorNode ()
Create an AnchorNode with no anchor.
public AnchorNode ( Anchor anchor)
Create an AnchorNode with the specified anchor.
Parameters
Public Methods
public Anchor getAnchor ()
Returns the ARCore anchor if it exists or null otherwise.
public boolean isSmoothed ()
Returns true if the transformations are interpolated or false if they are applied immediately.
public boolean isTracking ()
Returns true if the ARCore anchorâs tracking state is TRACKING.
public void onUpdate ( FrameTime frameTime)
AnchorNode overrides this to update the node's position to match the ARCore Anchor's position.
Parameters
public void setAnchor ( Anchor anchor)
Set an ARCore anchor and force the position of this node to be updated immediately.
Parameters
public void setLocalPosition ( Vector3 position)
Set the local-space position of this node if it is not anchored. If the node is anchored, this call does nothing.
Parameters
public void setLocalRotation ( Quaternion rotation)
Set the local-space rotation of this node if it is not anchored. If the node is anchored, this call does nothing.
Parameters
public void setSmoothed (boolean smoothed)
Set true to smooth the transition between the nodeâs current position and the anchor position. Set false to apply transformations immediately. Smoothing is true by default.
Parameters
public void setWorldPosition ( Vector3 position)
Set the world-space position of this node if it is not anchored. If the node is anchored, this call does nothing.
Parameters
public void setWorldRotation ( Quaternion rotation)
Set the world-space rotation of this node if it is not anchored. If the node is anchored, this call does nothing.