AndrianBdn / GVR-SceneKit

Example of iOS SceneKit + Google VR SDK app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I use a .SCN file?

ManjitBedi opened this issue · comments

I would like to be able to load a .SCN file instead of creating all the geometry in the scene programatically.

e.g.,

let scene = SCNScene(named:"myscene");

Is this possible?

I got something to work by doing the following:

    required override init() {
        
        scene = SCNScene(named:"Splash.scnassets/splash.scn") ??  SCNScene();

Thank you for the question and the answer, @ManjitBedi !

Thanks for making the code available; it is really helpful. There are issues as you have mentioned. I was experiencing the right camera not displaying properly; it seemed to be because of the floor plane in my scene. I will need to read up more on the SCNRenderer.