Skip to content
lsl.devlsl.devLSL Dev

llGetRegionSunDirection

function
Function syntax
vector llGetRegionSunDirection();
Returns
vector
Energy
10

Returns a normalized vector to the current sun position at the location of object containing the script. llGetSunDirection is the vector to the parcel’s sun, llGetRegionSunDirection is the vector to region’s sun. If there is no custom environment set for the current parcel llGetSunDirection returns the direction to the region’s sun. These functions are altitude aware.

How to use
vector result = llGetRegionSunDirection();

Newer function that consolidates many environment-based settings.

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.