Add Lights to LightPicker

Software: Away3D 4.x

RIPI, Jr. Member
Posted: 24 April 2012 01:34 PM   Total Posts: 33

Hi!

Is it possible, to add lights to an existing lightpicker?

I’d like to add lights dynamically to the scene.
after generating the scene i create another light, add it to the scene, add it to the lightpicker (_lightpicker.lights.push(tempLight);). I’ve even tried to apply the lightpicker again to the materials, but the light doesn’t appear. I’ve also tried to replace the Light by a simple Mesh, and i can see the added Mesh. But no lights.

Thank you!

   

Avatar
Matse, Sr. Member
Posted: 24 April 2012 02:30 PM   Total Posts: 149   [ # 1 ]

Here’s how I do it, I think I had a look at the StaticLightPicker class some time ago to find out but there might be a better way :

lightPicker.lights [light1light2]

Beware there is a pretty tight limit to how many lights you can add to a lightPicker, I think Fabrice told us it was 3 but not sure anymore, 2 are enough for me so far smile

   

RIPI, Jr. Member
Posted: 24 April 2012 02:42 PM   Total Posts: 33   [ # 2 ]

Thank you!

Initially i also put some lights to the lightpicker as you described it. I think the limit might be the problem here, because i’ve already added three lights, and now i wanted to add some more dynamic lights…

Thank you very much, that was helpful wink

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X