Inherits MonoBehaviour.
Public Member Functions | |
delegate void | OnTrackingChangedDelegate (NRWorldAnchor worldAnchor, TrackingState state) |
void | BindAnchor (UInt64 handle) |
bool | CreateAnchor () |
bool | SaveAnchor () |
bool | DestroyAnchor () |
bool | EraseAnchor () |
void | UpdatePose (Pose pose) |
Public Attributes | |
string | UUID |
UInt64 | AnchorHandle |
string | UserDefinedKey |
Events | |
OnTrackingChangedDelegate | OnTrackingChanged |
Detailed Description
The WorldAnchor component allows a GameObject's position to be locked in physical space. For example, a cube arranged on top of a physical desk with a WorldAnchor applied will remain fixed even as an observer walks around the room. This overrides all manipulation of the GameObject's position and orientation. To move the GameObject, first remove the WorldAnchor and manipulate the Transform normally. While it is generally recommended to use Destroy instead of DestroyImmediate, it's best to call Destroy on WorldAnchor objects. Doing so will let you manipulate the Transform of the GameObject including adding a new WorldAnchor.
Member Function Documentation
◆ BindAnchor()
void NRKernal.Persistence.NRWorldAnchor.BindAnchor | ( | UInt64 | handle | ) |
Bind this anchor to an existing handle.
- Parameters
-
handle The handle of the anchor
◆ CreateAnchor()
bool NRKernal.Persistence.NRWorldAnchor.CreateAnchor | ( | ) |
Create a new anchor at current pose
- Returns
- return true if successful
◆ DestroyAnchor()
bool NRKernal.Persistence.NRWorldAnchor.DestroyAnchor | ( | ) |
Destroy the anchor from memory
- Returns
- return true if successful
◆ EraseAnchor()
bool NRKernal.Persistence.NRWorldAnchor.EraseAnchor | ( | ) |
Erase the anchor file from disk
- Returns
- return true if successful
◆ SaveAnchor()
bool NRKernal.Persistence.NRWorldAnchor.SaveAnchor | ( | ) |
Save the anchor to the disk
- Returns
- return true if successful