mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
do align to normal fix on relative to parent guy as well
This commit is contained in:
parent
8af38577ed
commit
41571af86d
@ -202,7 +202,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 = prop.transform.parent.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