Ability to spawn/destroy lights and control light parameters by saihv · Pull Request #3991 · microsoft/AirSim
About
This PR adds the ability to spawn blueprints in the world along with static mesh actors. Additionally, it introduces a couple of sample blueprint wrappers for a Point light and a Spot light, and allows spawning or destroying them - which could be useful for dynamic changes in indoor environments. This method of control wraps the lights in a blueprint (see Content/Blueprints/Lights) that allows for spawning as well as easier, extensible control.
The main thing to note is that to be able to use this API, the light being targeted should be a blueprint.
A new API function simSetLightIntensity() allows for changing the brightness of the lights. Example usage of the entire pipeline can be seen in PythonClient/environment/light_control.py
- Ability to spawn blueprints
- Brightness control
- Color control
- Unity placeholder API
How Has This Been Tested?
Drag Blueprints/Lights/PointLightBP.uasset into any world (e.g. Blocks), and then run PythonClient/environment/light_control.py