Hey everyone! ![]()
I’m working on an AR project in Unity (using AR Foundation) where I spawn objects representing city names based on my real-world location and orientation relative to each city. For example, if New York is to my left, an AR object saying “New York is here” should appear in the exact direction of New York.
The setup works correctly when I first launch the app—the objects spawn accurately relative to my position. However, when I reload the scene, the objects start to appear in random directions (e.g., New York shows up to my right instead of the left). I’m already restarting the compass and location services each time I destroy and respawn the city objects, but it hasn’t solved the problem.
I checked the location(my and target) is being fetched correctly. Also I noticed if an object is spawned in the enviroment then if any car or person moved in a camera vision then the object also starts moving with it(car or person), this shows the ar lost the tracking at that state. The thing is same setup is working absolute fine while the app is fresh launch but fails when I want to get other city data(destroying previous city object from ar scene).
My target platform is android and ios for now.
Does anyone have experience with stabilizing object positioning on scene reloads in AR? Any tips on how to keep consistent object placements without directional fluctuations?
Thanks for any insights! ![]()