UKismetMathLibrary::BreakVector2D
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Decomposes an FVector2D into its individual X and Y double components via output parameters. In Blueprint this appears as the 'Break Vector 2D' node.
Caveats & Gotchas
- • In C++, accessing InVec.X and InVec.Y directly is equivalent and more readable; this function exists primarily to support Blueprint's NativeBreakFunc pattern.
- • X and Y are output-only reference parameters — their initial values before the call are irrelevant and will be overwritten unconditionally.
Signature
static UE_INL_API void BreakVector2D(FVector2D InVec, double& X, double& Y); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InVec | FVector2D | The vector to decompose. | — |
| X | double& | Output: the X component of InVec. | — |
| Y | double& | Output: the Y component of InVec. | — |
Return Type
void Example
Extract components for separate use C++
FVector2D UV(0.75, 0.25);
double U, V;
UKismetMathLibrary::BreakVector2D(UV, U, V);
// U == 0.75, V == 0.25 See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?