how can i set light is enabled by Lua code in the simulation

Typically: "How do I... ", "How can I... " questions
Post Reply
quangabcd
Posts: 17
Joined: 23 May 2017, 02:42

how can i set light is enabled by Lua code in the simulation

Post by quangabcd »

I have a spot light and want to switch it during the simulation: either turn it on/off or change the color. There is no parameter for it and also setShapeColor does not work (it says the object is not a shape)

how can I do it

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

Re: how can i set light is enabled by Lua code in the simulation

Post by coppelia »

Hello,

have a look at sim.setLightParameters and object parameters related to lights.

Cheers

quangabcd
Posts: 17
Joined: 23 May 2017, 02:42

Re: how can i set light is enabled by Lua code in the simulation

Post by quangabcd »

thank you

Post Reply