Sphere
- Base:
- UBlueprintFunctionLibrary
- Type:
- UNSpherePickerLibrary / FNSpherePicker
- Header File:
- NexusActorPools/Public/NSpherePickerLibrary.h

Provides various functions for generating points [i]nside or [o]n the surface of a sphere using different random generation strategies (deterministic, non-deterministic, seeded).
The UNSpherePickerLibrary wraps the native FNSpherePicker functionality in a Blueprint friendly manner. Should you be wanting to utilize a picker in native code it is best to directly reference FNSpherePicker directly to avoid the abstraction layer as it has a similar API.
Methods​
Next Point​

Generates a deterministic point inside or on the surface of a sphere.
Uses FNRandom::Deterministic to ensure reproducible results.
Random Point​

Generates a random point inside or on the surface of a sphere.
Uses FNRandom::NonDeterministic to produce pseudo-random results.
One-Shot Point​

Generates a random point inside or on the surface of a sphere using a provided seed.
Tracked Point​

Generates a random point inside or on the surface of a sphere while tracking the random seed state.
FNSpherePickerParams​
Base​
| Parameter | Type | Description | Default |
|---|---|---|---|
| Count | int | The number of points to generate in a single pass. | 1 |
| CachedWorld | TObjectPtr<UWorld> | The world for line tracing and drawing. | |
| ProjectionMode | ENPickerProjectionMode | Should the point be projected somewhere? | ENPickerProjectionMode::None |
| Projection | FVector | Direction and distance for the line trace. | FVector(0,0,-500.f) |
| CollisionChannel | TEnumAsByte<ECollisionChannel> | The collision channel to use for tracing. | ECC_WorldStatic |
Sphere​
| Parameter | Type | Description | Default |
|---|---|---|---|
| Origin | FVector | The center point when attempting to generate new points. | FVector::ZeroVector |
| MinimumRadius | FVector2D | The minimum radius of the circle (inner bound). | 0.f |
| MaximumRadius | FVector2D | The maximum radius of the circle (outer bound). | 10.f |
| Rotation | FRotator | The rotation of the circle plane. | FRotator::ZeroRotator |