1

I'm working on a app that renders a 3D scene that simulates a real space into an iPhone making its screen become a hollow box, as seen in the sketch below:

(note the camera position order down below)

Sketch of proposal

The problem is on how to calculate the camera parameters to make the box look real fixed to the screen edges.

Is this feasible through SceneKit?

Ramon Balthazar
  • 3,907
  • 3
  • 25
  • 34

1 Answers1

1

In this configuration the camera's zNear plane corresponds to the screen of the iPhone. From that you can can derive a z position from the camera's field of view and the screen's width (see here).

Community
  • 1
  • 1
mnuages
  • 13,049
  • 2
  • 23
  • 40