Download

Astronomy Plugin

Im finishing up the Astronomy plugin, which provides a blueprint interface to do many kids of astronomical calculations. For example, you can calculate star and planet positions from any point and time on earth or model the solar system.The astronomy plugin The plugin has over 30 advanced astronomical functions accessible through blueprints, and can use three kinds of planet ephemeris: JPL Low precision formulas, VSOP87, and high-precision NASA ephemeris files.

I will add a feature to change the north direction for the 4.21 update.

In the meantime, if you are just using the included Sun, moon, and planet blueprints, you can add this yourself pretty easily. Basically its just adding a rotation around the (0,0,1) axis.

  1. Change the BP_EarthViewObject blueprint to add a float variable called North Adjustment, and make it instance editable.
  2. In the BP_EarthViewObject GetObjectLocation function, add a RotateVectorAroundAxis node using 0,0,1 as the axis, the North Adjustment variable as the Angle Deg, and the output of the calculate planet direction function (after it has been multiplied by distance) as the vector. (Screenshot 1)
  3. For the Moon, in the UpdateLightingFunction, you will need to do something similar as shown in the screenshot.
  4. Also for the Moon, add a rotation in the SetLocation function (screenshot 3). This keeps the lighting on the correct side of the moon.

Modifying StarManager to do this for Stars is going to involve some more complicated code changes, so that will have to wait until 4.21.