I'm trying to put the model on the constant coordinates in the real world to display them in AR. First I get the user coordinates, then I take the coordinates for the model and drive it into the transformation matrix. But still it does not work out to get the model location normally. I read the Apple documentation, but did not understand anything about the anchors, how to create and add to the model. Help me please!
let startLocation = locationManager.location! let latitude: CLLocationDegrees = 55.009981 let longitude: CLLocationDegrees = 82.936872 let locationMob: CLLocation = CLLocation(latitude: latitude, longitude: longitude) let translation = MatrixHelper.transformMatrix(for: matrix_identity_float4x4, originLocation: startLocation, location: locationMob) let position = SCNVector3.positionFromTransform(translation) mob.loadModel() mob.scale = SCNVector3(scale, scale, scale) mob.rotation = SCNVector4Zero mob.position = SCNVector3(x: position.x, y: position.y, z: position.z - 50) sceneView.scene.rootNode.addChildNode(mob)