Start native apps faster with the Composables CLI ->
Interface

FollowTarget

A FollowTarget can be used with androidx.xr.compose.spatial.FollowingSubspace to have a set of content follow a target such as an anchor or AR device.

Source set: Android
public sealed interface FollowTarget

A FollowTarget can be used with androidx.xr.compose.spatial.FollowingSubspace to have a set of content follow a target such as an anchor or AR device.

Members

Companion

Source set: Android
public companion object

Functions

ArDevice

Source set: Android
public fun ArDevice(session: Session): FollowTarget

By designating content to follow the AR device, it will keep that content near the device camera and typically within the field of view, even as the device moves around.

The Session is required to access the device's tracking state and to perform pose transformations between coordinate spaces.

Parameters

session The current Session instance used to track the device and transform poses.

Anchor

Source set: Android
public fun Anchor(anchorSpace: AnchorSpace): FollowTarget

Targeting an anchor allows content to be positioned relative to that anchor's location.

Parameters

anchorSpace represents the anchor which this androidx.xr.compose.spatial.FollowingSubspace will be tethered to. As the anchor moves, so will the androidx.xr.compose.spatial.FollowingSubspace