2

What is the point of a "pure" ARAnchor (that isn't an ARPlaneAnchor)?

Does ARKit ever automatically update/track or add/detect a pure ARAnchor? (Like how it does with ARPlaneAnchor?)

Why would anyone want to add a custom ARAnchor to ARKit, if they are not being tracked?

Can a pure ARAnchor ever be automatically "upgraded" to an ARPlaneAnchor by ARKit?

2

1 Answer 1

1

The main reason why you might use ARAnchor.....

  1. ARAnchor is suitable for non-SceneKit engine (SpriteKit, Metal, etc), for SceneKit it is the same (since ARKit derived from SceneKit and has the same world coordinate)

  2. If you're using ARSKView, you need a way to reference positions / orientations in 3D (real-world) space, because SpriteKit isn't 3D. You need ARAnchor to keep track of positions in 3D so that they can get mapped into 2D.

  3. If you're building your own non-SceneKit engine with Metal (or GL)... that's not a 3D scene description API — it's a GPU programming API — so it doesn't really have a notion of world space. You can use ARAnchor as a bridge between ARKit's notion of world space and whatever you build.

What's the difference between using ARAnchor to insert a node and directly insert a node?

3
  • 1
    Unfortunately, I can't really see the use-case, because: A) the transform of an ARAnchor is read-only (the API doesn't provide a way to modify it. And B) as this accepted SO answer seems to imply, each transform always has the same fixed value (unless I'm mistaken) - so it's not even updated by ARKit? Then what's the point? You could just as well keep a set of anchors in your own array/dictionary. Unless they are updated or even automatically added/detected by ARKit?
    – aidinabedi
    Dec 30, 2017 at 18:17
  • I know this is a month old. But I've come across a use-case recently, where I believe adding a pure anchor manually is really helpful. If you want to place a model at a really precise location, one way is to walk to that spot and using tap gesture (hitTest) & add the pure anchor in world space. You can then attach a node to that anchors position at anytime the app requires. More importantly, apparently since Arkit 1.5 (iOS 11.3)... Arkit now does some extra work to make sure that its world coordinate space lines up accurately with the real world, at least in the vicinity of that point.
    – Clay
    Feb 6, 2018 at 1:57
  • @Clay are you seeing your ARAnchor transforms actually get updated? I am not. Apr 23, 2021 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.