Skip to content

Instantly share code, notes, and snippets.

@chadcooper
Created April 2, 2013 00:44
Show Gist options
  • Save chadcooper/5289048 to your computer and use it in GitHub Desktop.
Save chadcooper/5289048 to your computer and use it in GitHub Desktop.
In Vue, the sun is just another object, so to move it, move it just like any other object.
# Position the sun
select_sun = SelectByName("Sun light")
sun = GetSelectedObjectByIndex(0)
# Sun position changes for each KOP
# Pitch and yaw are floats kept in a dict
sun_pitch = float(kop.get("SunPitch"))
sun_yaw = float(kop.get("SunYaw"))
sun.SetRotationAnglesV((sun_pitch, 0, sun_yaw), true)
Refresh()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment