UKismetAnimationLibrary::K2_MakePerlinNoiseVectorAndRemap
#include "KismetAnimationLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Samples 3D Perlin noise at (X, Y, Z) independently per axis and remaps each resulting component into its own output range. Commonly used to drive smooth, continuous procedural motion like idle sway.
Caveats & Gotchas
- • Each axis is sampled and remapped independently using its own X/Y/Z input and range — this is not a single 3D vector noise field, so the X, Y, and Z outputs are not spatially correlated with each other.
- • Raw Perlin noise output is roughly in [-1, 1]; the default RangeOutMin/Max values pass it through unchanged, so remapping only has an effect once you override the defaults.
- • For continuous animated motion, drive X/Y/Z with time (e.g. GetWorld()->GetTimeSeconds() times a frequency) rather than a fixed position, otherwise the output never changes.
Signature
static FVector K2_MakePerlinNoiseVectorAndRemap(float X, float Y, float Z, float RangeOutMinX, float RangeOutMaxX, float RangeOutMinY, float RangeOutMaxY, float RangeOutMinZ, float RangeOutMaxZ) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| X | float | X input position for the noise function. | — |
| Y | float | Y input position for the noise function. | — |
| Z | float | Z input position for the noise function. | — |
| RangeOutMinX | float | Minimum of the output range for the X component. | -1.f |
| RangeOutMaxX | float | Maximum of the output range for the X component. | 1.f |
| RangeOutMinY | float | Minimum of the output range for the Y component. | -1.f |
| RangeOutMaxY | float | Maximum of the output range for the Y component. | 1.f |
| RangeOutMinZ | float | Minimum of the output range for the Z component. | -1.f |
| RangeOutMaxZ | float | Maximum of the output range for the Z component. | 1.f |
Return Type
FVector Example
Idle sway offset driven by time C++
const float Time = GetWorld()->GetTimeSeconds();
const FVector SwayOffset = UKismetAnimationLibrary::K2_MakePerlinNoiseVectorAndRemap(
Time * 0.3f, Time * 0.25f, Time * 0.2f,
-5.f, 5.f, -5.f, 5.f, -2.f, 2.f); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?