mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make it local so that scatter works on tidally locked bodies
This commit is contained in:
parent
3265f8b076
commit
90f7d23479
@ -140,7 +140,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
var prop = scatterPrefab.InstantiateInactive();
|
var prop = scatterPrefab.InstantiateInactive();
|
||||||
prop.transform.SetParent(parent, false);
|
prop.transform.SetParent(parent, false);
|
||||||
prop.transform.position = go.transform.TransformPoint(point * height);
|
prop.transform.localPosition = point * height;
|
||||||
var up = (prop.transform.position - go.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);
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ namespace NewHorizons.External.Modules.Props
|
|||||||
public bool keepLoaded;
|
public bool keepLoaded;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The relative path from the planet to the parent of this object. Optional (will default to the root sector).
|
/// The relative path from the planet to the parent of this object. Optional (will default to the root sector). This parent should be at the position where you'd like to scatter (which would usually be zero).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string parentPath;
|
public string parentPath;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user