mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-10 14:44:17 +00:00
change angle of Sun around Y axis
This commit is contained in:
parent
f47b2adaf0
commit
c30551d718
1 changed files with 4 additions and 1 deletions
|
@ -13,6 +13,8 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
|
||||
public Light directionalLight;
|
||||
|
||||
public float lightYAngle = 45f;
|
||||
|
||||
public byte startTimeHours = 12;
|
||||
public byte startTimeMinutes = 0;
|
||||
|
||||
|
@ -152,7 +154,8 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
float UpdateLightAngle(float curveTime)
|
||||
{
|
||||
float lightAngle = this.lightAngleCurve.Evaluate(curveTime) * 180f;
|
||||
this.directionalLight.transform.rotation = Quaternion.AngleAxis(lightAngle, Vector3.right);
|
||||
this.directionalLight.transform.rotation =
|
||||
Quaternion.AngleAxis(lightAngle, Vector3.right) * Quaternion.AngleAxis(this.lightYAngle, Vector3.up);
|
||||
return lightAngle;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue