From 90f7d234794298d71bdb61bcf42fe3e5c098b06f Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Fri, 3 May 2024 08:40:09 -0400 Subject: [PATCH] Make it local so that scatter works on tidally locked bodies --- NewHorizons/Builder/Props/ScatterBuilder.cs | 2 +- NewHorizons/External/Modules/Props/ScatterInfo.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Props/ScatterBuilder.cs b/NewHorizons/Builder/Props/ScatterBuilder.cs index e9416b3a..5b6faa34 100644 --- a/NewHorizons/Builder/Props/ScatterBuilder.cs +++ b/NewHorizons/Builder/Props/ScatterBuilder.cs @@ -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); diff --git a/NewHorizons/External/Modules/Props/ScatterInfo.cs b/NewHorizons/External/Modules/Props/ScatterInfo.cs index 21d32d35..a03b2003 100644 --- a/NewHorizons/External/Modules/Props/ScatterInfo.cs +++ b/NewHorizons/External/Modules/Props/ScatterInfo.cs @@ -68,7 +68,7 @@ namespace NewHorizons.External.Modules.Props public bool keepLoaded; /// - /// 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). /// public string parentPath; }