Skip to main content

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​

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

Sphere: Next Point

Generates a deterministic point [i]nside or [o]n the surface of a sphere.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Next Point Projected (IO)​

Sphere: Next Point Projected

Generates a deterministic point [i]nside or [o]n the surface of a sphere, then projects it onto a surface in the world.

info

Uses FNRandom::Deterministic to ensure reproducible results.

Random Point (IO)​

Sphere: Random Point

Generates a random point [i]nside or [o]n the surface of a sphere.

Random Point Projected (IO)​

Sphere: Random Point Projected

Generates a random point [i]nside or [o]n the surface of a sphere, then projects it onto a surface in the world.

Random One-Shot Point (IO)​

Sphere: Random One-Shot Point

Generates a random point [i]nside or [o]n the surface of a sphere using a provided seed.

Random One-Shot Point Projected (IO)​

Sphere: Random One-Shot Point Projected

Generates a random point [i]nside or [o]n the surface of a sphere using a provided seed, then projects it onto a surface in the world.

Random Tracked Point (IO)​

Sphere: Random Tracked Point

Generates a random point [i]nside or [o]n the surface of a sphere while tracking the random seed state.

Random Tracked Point Projected (IO)​

Sphere: Random Tracked Point Projected

Generates a random point [i]nside or [o]n the surface of a sphere while tracking the random seed state, then projects it onto a surface in the world.

Parameters​

VariantParameterTypeDescriptionDefault
BaseOriginFVector&The center world point of the sphere.
BaseMinimumRadiusfloatThe minimum radius of the sphere (inner bound).
BaseMaximumRadiusfloatThe maximum radius of the sphere (outer bound).
SimpleRadiusfloatThe radius of the sphere.
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.