Detail stretch

This commit is contained in:
TerrificTrifid 2022-09-17 10:55:01 -05:00
parent b5a4c9f7ca
commit 2904af39d1
2 changed files with 6 additions and 1 deletions

View File

@ -98,7 +98,7 @@ namespace NewHorizons.Builder.Props
prop.transform.rotation = go.transform.TransformRotation(rot); prop.transform.rotation = go.transform.TransformRotation(rot);
} }
prop.transform.localScale = detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale; prop.transform.localScale = detail.stretch ?? (detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale);
prop.SetActive(true); prop.SetActive(true);

View File

@ -200,6 +200,11 @@ namespace NewHorizons.External.Modules
/// </summary> /// </summary>
[DefaultValue(1f)] public float scale = 1f; [DefaultValue(1f)] public float scale = 1f;
/// <summary>
/// Scale each axis of the prop. Overrides `scale`.
/// </summary>
public MVector3 stretch;
/// <summary> /// <summary>
/// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is /// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is
/// </summary> /// </summary>