Ridge Batty Posted August 17, 2017 Share Posted August 17, 2017 Hi, This is probably a misunderstanding on my part, but how can I get the light to shine on either of the objects in the PG? Meshes work just like I thought, I can display either of them by changing the bitmask. http://www.babylonjs-playground.com/#XUH5GR Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted August 17, 2017 Share Posted August 17, 2017 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) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Ridge Batty Posted August 17, 2017 Author Share Posted August 17, 2017 Thanks, that seems to do what I was aiming for. I'll try if this strategy works in my project which is quite a bit more complicated... Would be great to know if this is intended behavior. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 18, 2017 Share Posted August 18, 2017 Actually this should work but I had a bug in my resync scenario. Changing the mesh layer mask was not triggering the update of active lights. This is fixed now Thanks for reporting! Wingnut and aWeirdo 2 Quote Link to comment Share on other sites More sharing options...
Ridge Batty Posted August 18, 2017 Author Share Posted August 18, 2017 Excellent! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.