World
The World service is used for code that needs to interact with the world like spawning actors, finding actors or controlling directional light.
Access the world by injecting it in your services, actors and component classes.
Directional Light
By default, every scene has directional light which produces shadows. You may want to access this to update the direction or intensity at runtime.
The directional light exposes the following fields
direction: Vector3 - The direction vector can be updated to change the direction of the light. This can be used to emulate a sun.
intensity: number - How bright the light should be.
position: Vector3 - The position of the directional light instance. This can not be changed; instead, change the direction.
Last updated