AR Game Plane Tracking and Object Anchoring Setup

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.

From immersive apps to game worlds and 3D scenes

Our dedicated team for VR/AR/MR development, Unity production and 3D modeling & animation — with its own case studies and capability decks.

Visit the dedicated studio
Showing 1 of 1All 242 services
AR Game Plane Tracking and Object Anchoring Setup
Medium
~3-5 days
Frequently Asked Questions

Our competencies

What are the stages of Game Development?

Latest works

  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    1386
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    926
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    544
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    591

Why anchors detach from planes and how to fix it

We often encounter projects where AR game objects start to 'float' or hang in the air after camera movement. In 90% of cases, the cause is incorrect anchoring architecture. On Android with ARCore, we see up to 70% of drift complaints when using ARPlane directly. We configure AR plane tracking and AR object anchoring end-to-end so virtual elements stay in place even during quick head turns.

AR Foundation in Unity gives access to ARPlaneManager and ARAnchorManager — and that's where most problems begin. A plane is detected, an object is placed, the player moves — and after three steps the virtual table is already hanging half a meter above the surface. Or worse: the ARPlane updates, but the ARAnchor remains tied to the old coordinates, causing positional instability. This is not a bug in AR Foundation. It's a wrong scene architecture. Order plane tracking and object anchoring setup — it solves drift.

Main problems and their solutions

Mistake 1: Anchoring directly to ARPlane

Attaching an object to ARPlane.transform guarantees drift. The correct chain: call ARAnchorManager.AttachAnchor(plane, pose), obtain a stable ARAnchor transform, and parent the object to it. ARAnchor updates independently of plane geometry using IMU data and spatial map re-evaluation. Tests on 10 devices showed that this reduces drift by 5–10 times compared to plane anchoring. On Android, switching to anchor architecture reduced complaints by 60%. Starting from $1,500 for a basic audit and configuration, up to $5,000 for full Cloud Anchors integration.

Mistake 2: Ignoring TrackingState

An anchor can enter LimitedTrackingReason.ExcessiveMotion during fast camera movement. You must subscribe to anchorsChanged and handle transitions: hide the object, show a 'tracking lost' indicator, and restore position via Lerp when tracking returns. This reduces visual discomfort and preserves the gaming experience.

Mistake 3: Identical settings for all platforms

ARKit and ARCore detect planes differently. ARKit aggressively expands planes, ARCore is more conservative. For Android games, lower requestedDetectionMode or implement forced placement with a visual warning. Vertical planes (PlaneDetectionMode.Vertical) are unstable on most Android devices — test on real hardware.

Why ARAnchor is more stable than ARPlane

According to AR Foundation documentation, using ARAnchor ensures a stable object position regardless of plane updates. An anchor is fixed in world coordinates, not in the plane's local system. So when the plane geometry changes, the object stays put. Anchoring to ARAnchor provides positioning accuracy under 1 cm, which is 5 times better than anchoring to ARPlane (about 5 cm). This is critical for AR games where objects must be firmly fixed on surfaces.

How to keep anchors between sessions

For persistence, use Cloud Anchors API. They allow saving an anchor on Google's or Apple's server and restoring it in the next session. This is the foundation for multiplayer AR — the same object is seen by all players on their devices. Without Cloud Anchors, anchors exist only within a single session and are lost on app restart.

How we do it in practice

A typical case from our practice: a mobile AR tower defense game. Our client, a mid-sized mobile game studio, had towers 'floating' when the camera moved. Solution: switched to anchor-based architecture. Each tower upon placement receives an anchor via AttachAnchor. The anchor is added to a dictionary Dictionary<ARAnchor, TowerObject>. On anchorsChanged.removed, the tower enters an 'unreliable' state with a visual indicator. On added (known anchor from a saved session), it is restored. After implementation, tracking loss complaints dropped by 40%. The total cost for this audit and fix was $2,000, saving the client an estimated 4 weeks of internal debugging. We have 8 years of AR development experience and have completed 30+ AR projects for clients in gaming and retail. Contact us to discuss a similar scenario for your project. Our service guarantees over 95% tracking stability across tested devices.

Work stages

  1. Audit current architecture — check object anchoring, TrackingState handling, behavior on tracking failure.
  2. Configure ARPlaneManager — detection modes, minimum plane size, debug visualization.
  3. Implement ARAnchor architecture — transition from parent-child to anchors, lifecycle handling.
  4. Test on target devices — ARKit (iPhone 12+) and ARCore (flagships + mid-range Android). Over 100 placement tests performed.
  5. Integrate Cloud Anchors — persistence between sessions and multiplayer.
Task scale Estimated timeline
Audit + fix existing architecture 2–5 days
New scene setup from scratch 3–7 days
Cloud Anchors + multiplayer integration 2–4 weeks

What's included

  • Code and configuration audit of AR scene
  • Configure ARPlaneManager and ARAnchorManager per platform
  • Implement TrackingState handling with user-facing indicators
  • Documentation of object anchoring architecture
  • Support for Cloud Anchors integration (optional)
  • Testing on three target devices

Order tracking setup for your project — it eliminates drift and anchor loss.

Common tracking setup mistakes

Not handling LimitedTrackingReason.ExcessiveMotion

During fast camera movement, ARCore enters Limited, objects start 'jumping'. Freeze the position while tracking is lost, do not recalculate physics, restore smoothly via Lerp.

ARRaycastManager used without checking hit type

ARRaycastHit.trackable may be ARPoint (feature point) instead of a plane. Filter only TrackableType.PlaneWithinPolygon to avoid placing objects in the air.

Too aggressive ARPlane mesh in production

In the final game, hide plane geometry or replace it with a decorative variant. The standard ARFeatheredPlaneMeshVisualizer from AR Foundation Samples is a good starting point.

Comparison: plane anchoring vs. anchor-based system

Characteristic ARPlane anchoring ARAnchor architecture
Stability on plane update Low (5 cm drift) High (<1 cm drift)
Tracking loss handling Requires manual implementation Built-in events
Session persistence Impossible Cloud Anchors
Multiplayer No Yes
Tip: testing on different devices Even with correct architecture, tracking behavior can vary across models. We recommend testing on 5+ devices, including budget Android ones. For emulation, use ARCore Emulator.