Jump to content

How to remove a light


excelsior
 Share

Recommended Posts

Well another easy question i'm sure but how can i delete a light from my scene ? Let's say i ve got one light on and i want to turn another one on but turn the first one off because i don't want to render the shadow of two light how could i proceed ? if a light is at intensity 0 doe the engine still calcul shadow like if it was lit ? 

Link to comment
Share on other sites

@excelsior

It depends, you said you have two lights and want to turn light1 off and light2 on, are you planning on turning light1 on again later?

if not, then removing it (dispose as samuel answered) is probably best,

if yes, setting the intensity to 0 should stop it from casting shadows.

take a look at this PG, click on scene with mouse to turn on/off lights.

PG: http://www.babylonjs-playground.com/#PR3YQ#2

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