0

I am developing an iOS application in Objective-C, I need to apply on a detected face( using google vision's system) a .scn file. After set up a SceneView with a 3D object stored in a Node... I need to a apply it to a face:

  SCNVector3 currentPosition = [self.currentView unprojectPoint:(SCNVector3Make(newLeftEyePosition.x, newLeftEyePosition.y , ?))];
  self.ship.position = currentPosition;

The problem is the '?', because the value I put as parameter, should be calculated using the distance between the user's face and the device... but how should I get it ? an is what I am trying to do correct, or there is anything wrong in the reasoning?

Xartec
  • 2,369
  • 11
  • 22
Kuajia
  • 31
  • 1
  • 9
  • Possible duplicate of [How to use iOS (Swift) SceneKit SCNSceneRenderer unprojectPoint properly](https://stackoverflow.com/questions/25150737/how-to-use-ios-swift-scenekit-scnscenerenderer-unprojectpoint-properly) – Xartec Jan 17 '18 at 11:00
  • That is true man, I was looking for this question for a long, but never found it. Thank you. Should I remove the post or no ? – Kuajia Jan 17 '18 at 11:46

0 Answers0