0

Freebie: "Position toggle 1.0" (e.g., for turning lights on and off)

I've added a new free script to the Marketplace:

https://store.sansar.com/listings/113f9db2-9f6f-45ef-80f4-8c6594b28f6f/position-toggle-1.0

Quite a few people have asked if it's possible to turn lights on and off. I made this script as an answer to that request. You can't currently script lights' properties or make them appear and disappear. However, you can embed light sources in other objects. Since those objects can be dynamic and move, your lights can move with them. So turning on and off a light is as simple as instantly moving it into and out of the target portion of your scene. Maybe drop your light down 1 km below the floor.

This can also be used for crude door mechanisms, but the instant action would be disorienting and not pleasant. However, this could also be used to move other props between two positions and orientations (directions).

One little feature I added is a timeout. This is like how motion sensor lights work, where when you leave the room, the lights turn off after a while.

0 comments

Please sign in to leave a comment.