UKismetMathLibrary::Conv_IntToVector
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureBlueprintAutocast
Description
Broadcasts a single integer to all three components of an FVector, producing (InInt, InInt, InInt) as doubles.
Caveats & Gotchas
- • All three components receive the same value. If you need a vector with the integer only in one axis (e.g. FVector(0, 0, InInt)), construct FVector directly rather than converting and masking.
- • The int32 is widened to double, so precision is exact for the full int32 range. However the result is not a unit vector — normalise if direction is intended.
Signature
static UE_INL_API FVector Conv_IntToVector(int32 InInt) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InInt | int32 | The integer to broadcast to all three vector components. | — |
Return Type
FVector Example
Scale an actor uniformly from an integer setting C++
int32 ScaleFactor = 3;
FVector UniformScale = UKismetMathLibrary::Conv_IntToVector(ScaleFactor);
MyActor->SetActorScale3D(UniformScale); // Scale to 3x in all axes Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?