iosiphonescenekitscnnodescnsphere

SCNScene / SCNSphere's visible area


I have a SCNScene that contains a SCNSphere encapsulating the SCNCamera (camera is inside @ center of the SCNSphere, displaying its inner wall on screen).

Is there a method to query or a way to infer / calc the VISIBLE area of this sphere? I dont want the area of the screen in points, or the area of the scene itself, but what the camera is able to render from this sphere in a given device's screen (ipad and iphone do show a different amount of a 360 frame)

Help appreciated.


Solution

  • CameraNode.positions just set on the front

        cameraRollNode.position = SCNVector3(x: 0, y: 0, z: X)
    

    Set sphere material:

        sphere_.firstMaterial!.cullMode = SCNCullMode.Front;
    

    PIC had two sphere. HOLP it useful.

    enter image description here