UKismetMathLibrary::RandomPointInBoundingBoxFromStream_Box
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns a random point inside the given FBox, drawn from a specific FRandomStream so the point can be reproduced given the same seed. This is the FBox-based counterpart to RandomPointInBoundingBoxFromStream, which takes a center and half-size instead.
Caveats & Gotchas
- • The Blueprint node is labeled "Random Point In Bounding Box From Stream (Box)" via a DisplayName meta — the C++ name keeps the _Box suffix for disambiguation from the center/half-size overload.
- • An uninitialized or degenerate FBox (Min == Max on an axis) always returns that fixed coordinate on that axis rather than erroring.
Signature
static FVector RandomPointInBoundingBoxFromStream_Box(const FRandomStream& Stream, const FBox Box) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Stream | const FRandomStream& | The random stream to draw from. | — |
| Box | const FBox | The axis-aligned box to sample a point within. | — |
Return Type
FVector Example
Deterministic point within a level bounds volume C++
FRandomStream PlacementStream(LevelSeed);
FVector Point = UKismetMathLibrary::RandomPointInBoundingBoxFromStream_Box(PlacementStream, LevelBounds); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?