I have this SCNScene which is quite nice and contains some nSCNNodes... Now I want to display this Scene in an ARSCNView. But, my whole scene is built with x,y,z >= 0 aka if I'd just set the screen my whole scene would be behind the camera.
I also can't render my scene inside the view, after I have the currentFrame because there are just too many nodes and it gets stuck...
So: I'm searching for a way to somehow transform my SCNScene, so that it doesn't change itself, but get's a proper position in front of the camera (which is 0,0,0) and maybe gets scaled down a little.
Is that even possible? If so what transformations would I have to do on which objects?
Thanks for reading :)
Assuming I am interpreting you correctly, you want to do two things:
In the first part of your question you say that you can't load the model because there are too many nodes. Since you havent posted any code it's hard to provide a concrete solution but this might help.
(a) In your
SCNScenecreate anEmptyNodeand call it 'Root' etc, then make all your actual scene elements a child of this e.g:Since we now have a 'Root' node which holds the scene we can simply do this to load it:
You could also look at loading it on a background thread e.g:
You will need to experiment with scale etc, but this should get you started.