2

For the purposes of lining up a UIView overlay and some SceneKit objects I need to project some SceneKit world coordinates to 2D view coordinates.

The wrinkle is that the UIView fades in as the camera is moving to its final position, and therefore if I use [view projectPoint:] I get the wrong answer because it is projected from the camera's current position, rather than its final position.

First: have I missed some obvious built-in method that will let me project from an arbitrary point?

Second: if not, how can I create a custom projectPoint method that operates from an arbitrary point of view?

Promising leads seem to be GLKMatrix4MultiplyAndProjectVector3 and SCNCamera's projectionTransform, but so far I haven't been able to put these together in a way that produces a sensible answer.

jawj
  • 463
  • 3
  • 11
  • have you found how to do that? thanks. – Duck May 30 '16 at 16:26
  • Possible duplicate of [How to use iOS (Swift) SceneKit SCNSceneRenderer unprojectPoint properly](http://stackoverflow.com/questions/25150737/how-to-use-ios-swift-scenekit-scnscenerenderer-unprojectpoint-properly) – mnuages Feb 13 '17 at 16:38

0 Answers0