Light sources
There are three types of light sources in the Varwin library:
- Spot light
- Direct light
- Point light
- No light
All light sources are visible in the editor, but invisible in preview mode
Setting in the inspector
In the settings of the inspector, for all light sources the same parameters are set to change
Color - set the color of the outgoing light
Distance - the distance to which the light can travel at most
intensity - sets the density of the incident light on a surface
Shadows type - Parameter that affects the shadows of objects within the light range of this source. Among the available parameters of this block there are available:
No shadows - Objects do not cast shadows
Hard shadows - Objects cast clear shadows
Soft shadows - The objects cast more blurred shadows than hard shadows
Shadow strength - sets the intensity of shadows cast by objects
There is an additional setting in the Inspector for the floodlight, which regulates the angle of illumination by the given light source
Spotlight
The floodlight source shines, respectively, like a spotlight
Behaviors are defined for floodlighting:
Spotlight angle - angle of light propagation from the spotlight
Range of light - the distance over which light can spread to a maximum extent
light intensity - sets the density of the incident light on a surface
Shadow intensity - sets the intensity of casting shadows from objects
Glow Color - sets the color of the outgoing light. To set the color, click on the color in the block and specify the color either in HEXA/RGBA/HSLA formats or in the palette. More about working with color
Type of shadows - Parameter that affects the shadows of objects that are in the range of the light from this source. Among the available parameters of this block are available:
No shadows - Objects do not cast shadows
Hard shadows - Objects cast clear shadows
Soft shadows - The objects cast more blurred shadows than hard shadows
Example of usage
In the standard project “Flying bot world” place a spotlight over the robot’s head
In the logic editor, assemble the following diagram. Note that in the last block the light is given a constant rotation along the Y-axis
Apply logic and run the project
Directional light
Directional light is a global light source, you can position it on stage like the sun. Its position and scale don’t matter, only its rotation - you can place it under the ground. It determines where the light will fall from


If the scene template already has a global light source, setting this will not affect the lighting
Behaviors are defined for directional light:
light intensity - sets the density of incident light on a surface
shadow intensity - sets the intensity of casting shadows from objects
Glow Color - sets the color of the outgoing light. To set the color, click on the color in the block and specify the color either in HEXA/RGBA/HSLA formats or in the palette. More about working with color
type of shadows - Parameter that affects the shadows of objects in the light range of this source. Among the available parameters of this block are available:
No shadows - Objects do not cast shadows
Hard shadows - Objects cast clear shadows
Soft shadows - Objects cast more blurred shadows than hard shadows
Point light
The point light, unlike the previous ones, shines in all directions at once - no matter what rotation you set it to
Behaviors are defined for point light:
Range of light - the distance over which light can travel at most
light intensity - sets the density of light falling on a surface
Shadow intensity - sets the intensity of shadows cast by objects
Glow Color - sets the color of the outgoing light. To set the color, click on the color in the block and specify the color either in HEXA/RGBA/HSLA formats or in the palette. More about working with color
Type of shadows - Parameter that affects the shadows of the objects that are in the range of the light from this source. Among the available parameters of this block are available:
No shadows - Objects do not cast shadows
Hard shadows - Objects cast clear shadows
Soft shadows - Objects cast more blurred shadows than hard shadows