Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

Augmented Reality and ARKit Tutorial

Learn how to work with augmented reality in this SpriteKit and ARKit tutorial!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/378-augmented-reality-and-arkit-tutorial
1 Like

I have a question regarding ARFrame.camera object. If matrix_float4x4 cam = [frame.camera transform], is camera forward vector(look at vector) is (cam.m02, cam.m12. cam.m22)?

I think there may be a bug in this tutorial. Even when I download the final project, the nodes move with the camera, making it impossible to “scoop” the bugspray and kill the firebug. Am I missing something? I would like to know how to have these anchors stay in place as opposed to moving with me wherever I go.

Hi @dchilds64

The anchor node positions are constantly re-calibrated. I find that if I start the game with my phone at right angles to the floor and stay still for a moment, the nodes stay in place. If you start the game with the phone pointed towards the floor or with the phone at a low height, the circle of the game is changed - in that case the nodes and bugspray may be positioned below the floor.

Thanks for your reply! What’s weird is I just installed the app on two different devices, and it works perfectly on my iPhone 7 plus, but not on my iPhone 8 plus. On my 8 the nodes move with the camera. I installed the app from the same build at almost the exact same time.

That is weird and disturbing - unfortunately I don’t have an iPhone 8 to test it with. Perhaps this is the final nudge to go and get one :smiley:

I have the exact same problem as you and I cannot pick the bug spray :frowning:

@caroline Can you please help with this when you get a chance? Thank you - much appreciated! :]

@rolland - is this on the iPhone 8 plus? Do you have another device to see if it is working? Which iOS version? There is a new beta which has vertical tracking too but I haven’t tried it yet

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!