# llGetRegionSunRotation

*LSL function*

```lsl
rotation rotation llGetRegionSunRotation();
```

- Returns: `rotation`
- Energy: 10

Return the rotation applied to the sun for the region at the location of the object containing the script. These functions are altitude aware and so will pick up the sun for their current track. [llGetRegionSunRotation](/functions/llGetRegionSunRotation/) returns the rotation applied at the region level, [llGetSunRotation](/functions/llGetSunRotation/) does the same for the parcel. If there is no custom environment applied to parcel [llGetSunRotation](/functions/llGetSunRotation/) returns the same value as [llGetRegionSunRotation](/functions/llGetRegionSunRotation/).

```lsl title="How to use" frame="terminal"
rotation result = llGetRegionSunRotation();
```

## See also

### Functions

- [llGetEnvironment](/functions/llGetEnvironment/)

Newer function that consolidates many environment-based settings.

- [llGetDayLength](/functions/llGetDayLength/)
- [llGetDayOffset](/functions/llGetDayOffset/)
- [llGetMoonDirection](/functions/llGetMoonDirection/)
- [llGetMoonRotation](/functions/llGetMoonRotation/)
- [llGetSunDirection](/functions/llGetSunDirection/)
- [llGetSunRotation](/functions/llGetSunRotation/)
- [llGetRegionDayLength](/functions/llGetRegionDayLength/)
- [llGetRegionDayOffset](/functions/llGetRegionDayOffset/)
- [llGetRegionMoonDirection](/functions/llGetRegionMoonDirection/)
- [llGetRegionMoonRotation](/functions/llGetRegionMoonRotation/)
- [llGetRegionSunDirection](/functions/llGetRegionSunDirection/)
- [llGetRegionSunRotation](/functions/llGetRegionSunRotation/)

---

*Source: [LlGetRegionSunRotation](https://wiki.secondlife.com/wiki/LlGetRegionSunRotation) on the Second Life Wiki. Content from the Second Life Wiki article LlGetRegionSunRotation (revision 1211047, 2022-08-23), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llGetRegionSunRotation/
