FollowTarget

@ExperimentalFollowingSubspaceApi
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.

FollowingSubspace has been deprecated. Use androidx.xr.compose.spatial.Subspace with androidx.xr.compose.subspace.animation.follow.FollowTarget instead.

Summary

Public companion functions

FollowTarget
Anchor(anchorSpace: AnchorSpace)

This function is deprecated. FollowingSubspace has been deprecated.

FollowTarget
ArDevice(session: Session)

This function is deprecated. FollowingSubspace has been deprecated.

Public companion functions

Anchor

Added in 1.0.0-beta02
Deprecated in 1.0.0-beta02
fun Anchor(anchorSpace: AnchorSpace): FollowTarget

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

FollowingSubspace has been deprecated. Use androidx.xr.compose.spatial.Subspace with androidx.xr.compose.subspace.animation.follow.FollowTarget.anchor instead.

Parameters
anchorSpace: 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

ArDevice

Added in 1.0.0-beta02
Deprecated in 1.0.0-beta02
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.

FollowingSubspace has been deprecated. Use androidx.xr.compose.spatial.Subspace with androidx.xr.compose.subspace.animation.follow.FollowTarget.view instead.

Parameters
session: Session

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