Contents

WorldTrackingLimitation

A structure to represent limitations of tracking the user’s surroundings.

Declaration

struct WorldTrackingLimitation

Overview

You receive a set of world tracking limitations when you read the worldTrackingLimitations environment value. The value tells you which limitations the device currently is facing. If any of the limitations occur due to changing circumstances, e.g., the lighting, the set is updated accordingly. For example, the following Text view automatically updates when the world tracking limitations change:

@Environment(\.worldTrackingLimitations)
private var worldTrackingLimitations

var body: some View {
    Text("Can track translation?" + worldTrackingLimitations
        .contains(.translation) ? "No" : "Yes")
}

Topics

Type Properties

See Also

Interacting with volumes