public void UpdateSunDirection(Light sunlight) { MyContract.RequireField(PlanetNumber != OrbitingBody.SUN, "this must not be the sun", "PlanetNumber"); MyContract.RequireFieldNotNull(Maths, "Maths"); Vector3 current_position = Maths.current_location_game_coordinates(); Quaternion Rotation = Quaternion.LookRotation(current_position); sunlight.transform.rotation = Rotation; }