Detail stretch (#395)

Vector3 scale for details
This commit is contained in:
Nick 2022-09-17 12:05:30 -04:00 committed by GitHub
commit 25fc5ce2c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -98,7 +98,7 @@ namespace NewHorizons.Builder.Props
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);

View File

@ -200,6 +200,11 @@ namespace NewHorizons.External.Modules
/// </summary>
[DefaultValue(1f)] public float scale = 1f;
/// <summary>
/// Scale each axis of the prop. Overrides `scale`.
/// </summary>
public MVector3 stretch;
/// <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
/// </summary>

View File

@ -1049,6 +1049,10 @@
"format": "float",
"default": 1.0
},
"stretch": {
"description": "Scale each axis of the prop. Overrides `scale`.",
"$ref": "#/definitions/MVector3"
},
"quantumGroupID": {
"type": "string",
"description": "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"