UKismetMathLibrary::Multiply_MatrixFloat
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Multiplies every element of a matrix by a scalar value. Useful for weighting matrices before blending, not for scaling a transform.
Caveats & Gotchas
- • The parameter type is `double` even though most UE math uses `float` — passing a float literal is fine due to implicit promotion, but be aware in generic template contexts.
- • Scaling a transform matrix this way scales both the rotational and translational components equally. If you intend to scale only the transform of an object, use FTransform::ScaleTranslation or apply scale via the basis vectors instead.
Signature
static UE_INL_API FMatrix Multiply_MatrixFloat (const FMatrix& A, double B) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | const FMatrix& | The matrix to scale. | — |
| B | double | The scalar multiplier applied to every element. | — |
Return Type
FMatrix Example
Weight a matrix for linear blend skinning C++
float Weight = 0.4f;
FMatrix WeightedMatrix = UKismetMathLibrary::Multiply_MatrixFloat(BoneMatrix, Weight); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?