Skip to main content

Spline

Base:
UBlueprintFunctionLibrary
Type:
UNSplinePickerLibrary / FNSplinePicker
Header File:
NexusActorPools/Public/NSplinePickerLibrary.h

Spline: Next Density

Provides various functions for generating points along a USplineComponent spline using different random generation strategies (deterministic, non-deterministic, seeded).

The UNSplinePickerLibrary wraps the native FNSplinePicker functionality in a Blueprint friendly manner. Should you be wanting to utilize a picker in native code it is best to directly reference FNSplinePicker directly to avoid the abstraction layer as it has a similar API.

Methods​

Next Point​

Spline: Next Spline: Next Projected

Generates a deterministic point on a USplineComponent's spline.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Random Point​

Spline: Random Spline: Random Projected

Generates a random point on a USplineComponent's spline.

info

Uses FNRandom::NonDeterministic to produce pseudo-random results.

One-Shot Point​

Spline: One-Shot Spline: One-Shot Projected

Generates a random point on a USplineComponent's spline using a provided seed. nerates a random point on a USplineComponent's spline using a provided seed, then projects it to the world.

Tracked Point​

Spline: Tracked Spline: Tracked Projected

Generates a random point on a USplineComponent's spline while tracking the random seed state.

FNSplinePickerParams​

Base​

ParameterTypeDescriptionDefault
CountintThe number of points to generate in a single pass.1
CachedWorldTObjectPtr<UWorld>The world for line tracing and drawing.
ProjectionModeENPickerProjectionModeShould the point be projected somewhere?ENPickerProjectionMode::None
ProjectionFVectorDirection and distance for the line trace.FVector(0,0,-500.f)
CollisionChannelTEnumAsByte<ECollisionChannel>The collision channel to use for tracing.ECC_WorldStatic

Spline​

ParameterTypeDescriptionDefault
SplineComponentTObjectPtr<USplineComponent>The spline component to generate points on.nullptr