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​
There are Simple variants of all of these methods which removes the inner exclusion when not needed as a minor optimization.
Next Point (IO)​

Gets the next deterministic point [i]nside or [o]n the FBox.
Uses FNRandom::Deterministic to ensure reproducible results.
Next Point Projected (IO)​

Gets the next deterministic point [i]nside or [o]n the FBox and projects it in the given direction.
Uses FNRandom::Deterministic to ensure reproducible results.
Random Point (IO)​

Gets a random point [i]nside or [o]n the FBox.
Random Point Projected (IO)​

Gets a random point [i]nside or [o]n the FBox and projects it in the given direction.
Random One-Shot Point (IO)​

Gets a random point [i]nside or [o]n the FBox using a one-shot seed.
Random One-Shot Point Projected (IO)​

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)​

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)​

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​
| Variant | Parameter | Type | Description | Default |
|---|---|---|---|---|
| Base | Origin | FVector& | The center world point of the FBox. | |
| Base | MinimumRadius | FBox& | The minimum dimensions to use when generating a point. | |
| Base | MaximumRadius | FBox& | The maximum dimensions to use when generating a point. | |
| Simple | Dimensions | FBox& | The dimensions of the FBox. | |
| Projected | WorldContextObject | UObject* | Object that provides access to the world, usally auto-filled in Blueprint. | WorldContext |
| Projected | Projection | FVector | Direction and distance for the line trace. | FVector(0,0,-500.f) |
| Projected | CollisionChannel | ECollisionChannel | The collision channel to use for tracing. | ECC_WorldStatic |
| Tracked | Seed | int32& | The seed to be used when generating, and altered for determinism. | |
| One-Shot | Seed | int32 | The throw-away seed used when generating. |