Table of content
There’s a few node in PCGEx that offer fitting settings – and while what is fitted is highly contextual, they all share the same settings.
Fitting is broken down in two parts: Scale to Fit, which is responsible for scaling something against a reference point’ bounds & scale, and Justification, which is responsible for the placement of the fitted something against the same reference bounds.
Scale to Fit
Scale the spawned asset bounds in order to fit within the host point’ bounds.
Scale to Fit Mode | Which type of scale-to-fit mode is to be applied. None disables this section, Uniform applies the same rule to each individual component, while Individual lets you pick per-component rules. |
Scale to Fit (value) | If Asset is selected as a source, this is the Asset Collection that will be used for staging points. |
You can use the following rules:
Scale to Fit | |
---|---|
None Disable the scaling rule. | |
Fill Scale the asset so it fills the point’ bounds. | |
Min Scale the asset so it fits snuggly within the minimum point’ bounds. | |
Max Scale the asset so it fits snuggly within the maximum point’ bounds. | |
Average Scale the asset so it fits the average of the point’ bounds. |
Justification
Offset the spawned asset bounds relative to the host point’ bounds.
Justification is processed per-component, after the scale-to-fit pass.
Per component | |
From | The location within the Asset bounds that will be justified To the point’ bounds. i.e, from which location in the asset do i start moving. |
To | The location withn the Point bounds to which the Asset bounds will be justified. i.e, to which location in the point do i want to go. |
Consolidated custom inputs | |
Custom from Vector Attribute | An FVector whose individual component will be used to drive From properties set to Custom .Prefer this consolidated approach if you’re using custom values on more than one component. |
Custom to Vector Attribute | An FVector whose individual component will be used to drive To properties set to Custom . Prefer this consolidated approach if you’re using custom values on more than one component.
|
From
You can use the following rules for From
:
Justify From | |
---|---|
Center Uses the asset bounds’ local center as reference point. | |
Min Uses the asset bounds’ min as reference point. | |
Max Uses the asset bounds’ max as reference point. | |
Pivot Uses the asset pivot as reference point, ignoring bounds. | |
Custom Uses a lerped reference point between the asset bounds’ min & max. Value is expected to be in the range 0-1 but isn’t clamped. |
To
You can use the following rules for To
:
Justify To | |
---|---|
Same Auto-selects the same justification as From , but computed against the point’ bounds. | |
Center Uses the point bounds’ local center as reference point. | |
Min Uses the point bounds’ min as reference point. | |
Max Uses the point bounds’ max as reference point. | |
Pivot Uses the point bounds’ pivot, ignoring bounds. | |
Custom Uses a lerped reference point between the asset bounds’ min & max. Value is expected to be in the range 0-1 but isn’t clamped. |