mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix rotation on stock planets
This commit is contained in:
parent
18f66f8701
commit
aaa87cc858
@ -130,7 +130,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
if (detail.alignToNormal)
|
if (detail.alignToNormal)
|
||||||
{
|
{
|
||||||
// Apply the rotation after aligning it with normal
|
// Apply the rotation after aligning it with normal
|
||||||
var up = go.transform.InverseTransformPoint(prop.transform.position).normalized;
|
var up = (prop.transform.position - go.transform.position).normalized;
|
||||||
prop.transform.rotation = Quaternion.FromToRotation(Vector3.up, up);
|
prop.transform.rotation = Quaternion.FromToRotation(Vector3.up, up);
|
||||||
prop.transform.rotation *= rot;
|
prop.transform.rotation *= rot;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user