UKismetMathLibrary::Vector4_Set
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Sets all four components of a Vector4 variable in-place using individual double values. Useful in Blueprint where you want to update a struct variable without constructing a new one.
Caveats & Gotchas
- • Parameters are double in the C++ signature but Blueprint pins are float. Precision is silently narrowed when the node is used in Blueprint; use C++ directly if you need full double precision.
- • Like Vector4_Assign, A is mutated via the UPARAM(ref) in-out pin in Blueprint — the node does not return a new vector.
Signature
static UE_INL_API void Vector4_Set(UPARAM(ref) FVector4& A, double X, double Y, double Z, double W) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | UPARAM(ref) FVector4& | The vector variable to modify in place. | — |
| X | double | New X component value. | — |
| Y | double | New Y component value. | — |
| Z | double | New Z component value. | — |
| W | double | New W component value. | — |
Return Type
void Example
Update an existing Vector4 with individual component values C++
FVector4 MyVec;
UKismetMathLibrary::Vector4_Set(MyVec, 3.0, 1.4, -2.0, 0.0);
// MyVec == (3.0, 1.4, -2.0, 0.0) See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?