Jump to content

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


JLHolmes
 Share

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?

Link to comment
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.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...