Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

ARKit - Moving a node with SCNNode.Position causes it to follow the camera

HenryBHenryB Member
edited December 2017 in Xamarin.iOS

I have some code that loads in a model (the ship one from the ARKit sample). If I don't set the position of the node, and then move the camera around it, the node appears to stay in place as expected. However, if I change the position of the node using SCNNode.Position, the object no longer stays in place, and moves with the camera. This video demonstrates what I mean:

This is a snippet of the code I'm using to set the node's position.

SCNScene newScene = SCNScene.FromUrl(url, dictionary, out error);
SCNNode node = newScene.RootNode;

sceneView.Scene.RootNode.FindChildNode("ship", true).Position = new SCNVector3(0, 0, -10f);

I've searched for the answer but I can't find what I'm doing wrong. Has anyone got any ideas?

Sign In or Register to comment.