I'm trying to understand how to manipulate *.scn asset files in ARKit, which as I understand it, is the file format for 3D models that we wish to "inject" into the camera's view of the world (hence augmentingreality). So given a particular *.scn file (model), I'm wondering:
- How does one position and orient the asset/3D model inside the world coordinates at a specific coordinate of their choosing, say, (x,y,z) : (10, 15, -5)?
- What ARKit/SCNKit API methods can I use to update model position at any given time?
For example, given the following some_tree.scn file that provides a 3D model (and its texture) of a tree:
sceneView.delegate = self
let scene = SCNScene(named: "art.scnassets/some_tree.scn")!
sceneView.scene = scene
It is my understanding that the SCN file itself will contain some default coordinates to render inside the scene at; if this is true, how can I override these default coordinates so that I can render the tree on a set of coordinates of my own choosing (again, say (10,15,-5))? But again, the main question from above is:
- What API does ARKit provide for positioning & orienting an SCN asset file in any location/position I want?
- What API does ARKit provide for me to update this position at any given point in time?
Thanks in advance for any and all help!