Sign in to follow this  
JLHolmes

Uncaught TypeError: Cannot read property 'globalPosition' of null at Function.t.BindEyePosition

Recommended Posts

Hey guys... need some help here, I'm getting this error:

babylon.js?98a3:20 Uncaught TypeError: Cannot read property 'globalPosition' of null
    at Function.t.BindEyePosition (babylon.js?98a3:20)

Now... I only get this error after I've reinitialized the engine a second time on a whole new canvas, while previously shutting down the old instance with engine.dispose(). The scenario that inits the scene is complex enough... and part of another project... so creating a playground would be difficult. (The playground seems to rebuild the whole dom and init anyways).

This appears to be coming from the MaterialHelper class, and the activeCamera variable appears to be null... not sure why, though.

Any leads on what this might be before I start digging?

Share this post


Link to post
Share on other sites

So I'll answer my own question in case someone else hits this.

Somewhere in the code, I had used MeshBuilder.CreateSphere(), but I had admitted the last parameter... the scene. It still worked, however... been working for months... UNLESS you happen to re-init the engine without refreshing the page from scratch.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.