mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
[Bug] [#457] Make scrolls use rotation parameter
This commit is contained in:
parent
e4450e1129
commit
d56a2f605f
@ -271,7 +271,14 @@ namespace NewHorizons.Builder.Props
|
||||
else customScroll.transform.position = planetGO.transform.TransformPoint(pos);
|
||||
|
||||
var up = planetGO.transform.InverseTransformPoint(customScroll.transform.position).normalized;
|
||||
customScroll.transform.rotation = Quaternion.FromToRotation(customScroll.transform.up, up) * customScroll.transform.rotation;
|
||||
if (info.rotation != null)
|
||||
{
|
||||
customScroll.transform.rotation = Quaternion.Euler(info.rotation);
|
||||
}
|
||||
else
|
||||
{
|
||||
customScroll.transform.rotation = Quaternion.FromToRotation(customScroll.transform.up, up) * customScroll.transform.rotation;
|
||||
}
|
||||
|
||||
customScroll.SetActive(true);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user