Example #1
0
 public Vector3 GetSunDirection(AtmosphereSun sun)
 {
     return((sun.transform.position - Origin).normalized);
 }
Example #2
0
 private Matrix4x4 GetSunWorldToLocalRotation(AtmosphereSun sun, Vector3 direction)
 {
     return(Matrix4x4.TRS(Vector3.zero + sun.Origin, Quaternion.FromToRotation(direction, sun.Z_AXIS), Vector3.one));
 }