PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetMoonDirection

Returns a DataType/Vector3 representing the direction of the moon from the position 0, 0, 0.

Note, when the moon has ‘set’ and is no longer visible, the DataType/Vector3 returned by this function will continue to point towards the moon below the map.

Developers looking to change the positioning of the moon should use the Lighting/ClockTime or Lighting/GeographicLatitude properties.

A variant of this function exists for obtaining the direction of the sun, Lighting/GetSunDirection.

Returns

Return Type Summary

DataType/Vector3 representing the direction of the moon from the position 0, 0, 0.


Code Samples


Lighting:GetMoonDirection

game.Lighting.TimeOfDay = "14:00:00"
print(game.Lighting:GetMoonDirection())