mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fixed orbit orientations
This commit is contained in:
parent
6b07ee8bf3
commit
98b2097091
@ -106,11 +106,10 @@ namespace NewHorizons.Components.Orbital
|
||||
|
||||
public static Vector3 Rotate(Vector3 vector, float longitudeOfAscendingNode, float inclination, float argumentOfPeriapsis)
|
||||
{
|
||||
var R1 = Quaternion.AngleAxis(longitudeOfAscendingNode, Vector3.up);
|
||||
var R2 = Quaternion.AngleAxis(inclination, Vector3.forward);
|
||||
var R3 = Quaternion.AngleAxis(argumentOfPeriapsis, Vector3.up);
|
||||
var R1 = Quaternion.AngleAxis(longitudeOfAscendingNode + argumentOfPeriapsis, Vector3.up);
|
||||
var R2 = Quaternion.AngleAxis(inclination, R1 * Vector3.left);
|
||||
|
||||
return R1 * R2 * R3 * vector;
|
||||
return R1 * R2 * vector;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user