# llGetSunRotation

*LSL function*

```lsl
rotation rotation llGetSunRotation();
```

- Returns: `rotation`
- Energy: 10

Return the rotation applied to the sun for the parcel at the location of the object containing the script. These function 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 = llGetSunRotation();
```

## 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: [LlGetSunRotation](https://wiki.secondlife.com/wiki/LlGetSunRotation) on the Second Life Wiki. Content from the Second Life Wiki article LlGetSunRotation (revision 1211041, 2022-08-23), CC BY-SA 3.0.*

---

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