Real AR devices fuse a camera feed with inertial sensors (SLAM) to build a sparse point cloud, detect planar surfaces, and place virtual "anchors" that stay fixed in world space as the device moves. This demo drives a physics-anchored object with simple projectile/bounce dynamics:
v(t+dt) = v(t) + g·dt
y(t+dt) = y(t) + v(t+dt)·dt
if y < plane: v ← -v·e (e = restitution)
- Feature point density — number of tracked SLAM points; more points raise tracking confidence but cost more compute.
- Anchor object scale — resizes the virtual object anchored to the detected plane.
- Restitution — bounciness coefficient
e applied on each floor collision.
- Plane detect toggle — without a detected plane the object has no surface to anchor to and free-falls through.
- Occlusion toggle — a real-world proxy box occludes the virtual object when it passes behind it, as real AR occludes virtual content with real geometry.
Real use: ARKit/ARCore use exactly this point-cloud + plane-detection + anchor pipeline to place furniture previews, game characters, and instructional overlays in physical rooms.