Make it local so that scatter works on tidally locked bodies

This commit is contained in:
Noah Pilarski 2024-05-03 08:40:09 -04:00
parent 3265f8b076
commit 90f7d23479
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ namespace NewHorizons.Builder.Props
var prop = scatterPrefab.InstantiateInactive();
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;
prop.transform.rotation = Quaternion.FromToRotation(Vector3.up, up);

View File

@ -68,7 +68,7 @@ namespace NewHorizons.External.Modules.Props
public bool keepLoaded;
/// <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>
public string parentPath;
}