# llGetMoonRotation

*LSL function*

```lsl
rotation rotation llGetMoonRotation();
```

- Returns: `rotation`
- Energy: 10

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

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

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

---

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