UKismetMathLibrary::Add_VectorFloat
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Adds a scalar float value to each component of a vector, returning {A.X+B, A.Y+B, A.Z+B}. Useful for uniformly expanding a bounding vector or biasing all axes simultaneously.
Caveats & Gotchas
- • The parameter is typed as double in the header (UE5 double-precision FVector), but Blueprint exposes it as a single float pin — precision loss is negligible for typical gameplay values but can matter in large-world scenarios.
- • This adds the same value to all three components; if you want per-axis offsets, use Add_VectorVector instead.
Signature
static UE_INL_API FVector Add_VectorFloat(FVector A, double B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FVector | The source vector. | — |
| B | double | The scalar value to add to each component. | — |
Return Type
FVector Example
Expand box extents uniformly C++
FVector Extents = MyBox.GetExtent();
// Grow extents by 10 units on every axis
FVector Grown = UKismetMathLibrary::Add_VectorFloat(Extents, 10.0); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?