Jump to content

How layermasks are supposed to work?


Ridge Batty
 Share

Recommended Posts

Hi @Ridge Batty

Something seems odd when setting the light's layerMask first, 
When the light is checking the masks, these values comes out;

light's "internal"  layerMask = 536870912  (  0x20000000 )
Mesh's "internal" layerMask = 268435455  (  0x10000000 ),

Both meshes displays the number for 0x1 ,  even through one of them actually has 0x2.

moving the line setting light's include layermask down below the meshes creation, seems to fix it.

 

Error can be seen here in console; http://www.babylonjs-playground.com/#XUH5GR#1

Working sample; http://www.babylonjs-playground.com/#XUH5GR#2  ( "light.includeOnlyWithLayerMask" moved to line #37)

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