UKismetMathLibrary::Multiply_Vector4Vector4
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the element-wise product of two FVector4 values: {A.X*B.X, A.Y*B.Y, A.Z*B.Z, A.W*B.W}. This is the Hadamard (component-wise) product, not a dot product or cross product.
Caveats & Gotchas
- • This is NOT the quaternion product or dot product — it is a pure component-wise multiply. Confusing it with quaternion multiplication will produce incorrect rotations.
- • To scale a Vector4 by a uniform scalar in C++, construct FVector4(Scale) or multiply each component manually; there is no scalar*Vector4 overload in this Blueprint library.
Signature
static UE_INL_API FVector4 Multiply_Vector4Vector4(const FVector4& A, const FVector4& B) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FVector4& | First vector. | — |
| B | const FVector4& | Second vector. | — |
Return Type
FVector4 Example
Component-wise scale a Vector4 C++
FVector4 Value(2.0, 3.0, 4.0, 1.0);
FVector4 Scale(0.5, 0.5, 0.5, 1.0);
FVector4 Result = UKismetMathLibrary::Multiply_Vector4Vector4(Value, Scale);
// Result == (1.0, 1.5, 2.0, 1.0) Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?