Occlusion¶
Occlusion handling allows XRTracker to maintain tracking when parts of the tracked object are blocked by other objects or by other tracked bodies in the scene.
What Is Occlusion in Tracking?¶
When an object is partially hidden — by a hand, another object, or even another tracked body — the tracker sees an incomplete view. Without occlusion handling, the tracker may misinterpret hidden areas and lose track.
XRTracker handles occlusion in two ways: it automatically tolerates partial blockage from unknown objects, and it can explicitly account for other tracked bodies that overlap.

Types of Occlusion¶
External Occlusion¶
Objects not being tracked (hands, tools, environment) block parts of the tracked object. XRTracker is naturally robust to this — it automatically ignores measurements from blocked areas and focuses on the visible portions. No configuration needed for moderate occlusion.
Self-Occlusion Between Tracked Bodies¶
When multiple bodies are tracked simultaneously, one body may partially block another. XRTracker can handle this explicitly because it knows the pose and geometry of both bodies.
For parent-child bodies, the child's Occlude Parent flag enables this automatically.
Occlusion Settings¶

Occlusion is configured per TrackedBody in the inspector:
| Setting | Description | Default |
|---|---|---|
| Enable Occlusion | Turns occlusion handling on for this body | Off |
| Radius | Sampling radius for occlusion checks (meters) | 0.01 |
| Threshold | Depth threshold for considering a point occluded (meters) | 0.01 |
Edge Modality Occlusion¶
For edge tracking, occlusion between multiple tracked bodies is handled automatically — no additional configuration is needed beyond adding the bodies to the scene.
Tips¶
- Enable occlusion only when needed — it adds rendering overhead
- Parent-child bodies benefit most — they are often close together and frequently overlap. Use the child's Occlude Parent flag (see Parent-Child Bodies)
- For external occlusion (hands, tools), the tracker handles moderate occlusion automatically — enable explicit occlusion only for multi-body overlap
- Tracking works best when at least 30-40% of the object remains visible