Jump to content

isInFrustum Undefined when changing isVisibility


Merfoo
 Share

Recommended Posts

So I'm working on a 3d-asteroids game and I'm trying to stop rendering the ship when the game ends by setting the .isVisible property to false. When I set the property to false it stills renders the ship, but when I set the property to true it throws a "Uncaught TypeError: Cannot call method 'isInFrustum' of undefined" error.

Link to game with error

http://team955.com/3d-asteroids/brokenShip/

 

Link to comment
Share on other sites

Ah so you can not set the visibility of a mesh with a parent that is a group. Now I just set the mesh._isEnabled property to false and worked :D, is this the proper way of not rendering meshes if its parent is a group instead? And whats the difference between using the two other than _isEnabled affects children and when would you use one over the other?

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...