Skip to main content

Box

Base:
UBlueprintFunctionLibrary
Type:
UNBoxPickerLibrary / FNBoxPicker
Header File:
NexusActorPools/Public/NBoxPickerLibrary.h

Provides various functions for generating points inside or on the surface of the FBox using different random generation strategies (deterministic, non-deterministic, seeded).

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

Methods​

tip

There are Simple variants of all of these methods which removes the inner exclusion when not needed as a minor optimization.

Next Point (IO)​

Box: Next Point

Gets the next deterministic point [i]nside or [o]n the FBox.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Next Point Projected (IO)​

Box: Next Point Projected

Gets the next deterministic point [i]nside or [o]n the FBox and projects it in the given direction.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Random Point (IO)​

Box: Random Point

Gets a random point [i]nside or [o]n the FBox.

Random Point Projected (IO)​

Box: Random Point Projected

Gets a random point [i]nside or [o]n the FBox and projects it in the given direction.

Random One-Shot Point (IO)​

Box: Random One-Shot Point

Gets a random point [i]nside or [o]n the FBox using a one-shot seed.

Random One-Shot Point Projected (IO)​

Box: Random One-Shot Point Projected

Gets a random point [i]nside or [o]n the FBox using a one-shot seed and projects it in the given direction.

Random Tracked Point (IO)​

Box: Random Tracked Point

Gets a random point [i]nside or [o]n the FBox using a tracked seed. The seed is incremented each time this function is called.

Random Tracked Point Projected (IO)​

Box: Random Tracked Point Projected

Gets a random point [i]nside or [o]n the FBox using a tracked seed and projects it in the given direction. The seed is incremented each time this function is called.

Parameters​

VariantParameterTypeDescriptionDefault
BaseOriginFVector&The center world point of the FBox.
BaseMinimumRadiusFBox&The minimum dimensions to use when generating a point.
BaseMaximumRadiusFBox&The maximum dimensions to use when generating a point.
SimpleDimensionsFBox&The dimensions of the FBox.
ProjectedWorldContextObjectUObject*Object that provides access to the world, usally auto-filled in Blueprint.WorldContext
ProjectedProjectionFVectorDirection and distance for the line trace.FVector(0,0,-500.f)
ProjectedCollisionChannelECollisionChannelThe collision channel to use for tracing.ECC_WorldStatic
TrackedSeedint32&The seed to be used when generating, and altered for determinism.
One-ShotSeedint32The throw-away seed used when generating.