SceneKit Object between two points
问题 Given 2 points in 3D ( a , b ) and an SCNCapsule, SCNTorus, SCNTube etc., how to go about to position the object, so that the object starts at point a and ends at point b ? Code example in Swift or Objective-C would be appreciated. From Moustachs answer I managed to do a 2-dimension solution: var v1 = SCNVector3(x: Float(a.x), y: Float(a.y), z: 0.0) var v2 = SCNVector3(x: Float(b.x), y: Float(b.y), z: 0.0) let height = CGFloat(v1.distance(v2)) var capsule = SCNCapsule(capRadius: 0.1, height: