AnchorComponent

@MainThread
class AnchorComponent : Component

The Component that defines a spatial anchoring relationship between entities and real-world objects.

When this component is attached to an entity, the entity gains the ability to anchor itself to a specific point or marker in the physical world, enabling spatial alignment and persistence.

This component is currently effective only when used in full space.

Constructors

Link copied to clipboard
constructor(anchorTarget: AnchorTarget = AnchorTarget.createCameraTarget(), trackingMode: AnchorComponent.TrackingMode = TrackingMode.CONTINUOUS)

Creates an AnchorComponent with the specified AnchorTarget and tracking mode.

Types

Link copied to clipboard

Controls how an entity follows its target in the scene.

Properties

Link copied to clipboard
Link copied to clipboard

Position offset of the actual object relative to its AnchorTarget.

Link copied to clipboard

The rotation offset of the actual object relative to its AnchorTarget.

Link copied to clipboard

Controls how the entity follows its AnchorTarget.

Functions

Link copied to clipboard
open override fun clone(): Component

Creates and returns a copy of this Component instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String