UKismetMathLibrary::Conv_IntVectorToVector
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureBlueprintAutocast
Description
Converts an FIntVector (three int32 components) to an FVector (three doubles) component-wise. Commonly used when converting voxel or grid coordinates to world space.
Caveats & Gotchas
- • Lossless for the full int32 range — int32 values are exactly representable as double. However if you then multiply the resulting FVector by a voxel size to get world coordinates, keep in mind FVector uses double precision in UE5, so large grids remain accurate.
- • The reverse path (FVector to FIntVector) truncates — use FMath::FloorToInt or RoundToInt explicitly to control rounding before the reverse conversion.
Signature
static UE_INL_API FVector Conv_IntVectorToVector(const FIntVector& InIntVector) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InIntVector | const FIntVector& | The integer vector to convert component-wise. | — |
Return Type
FVector Example
Voxel grid coordinate to world location C++
FIntVector GridCell(10, 20, 5);
const double VoxelSize = 100.0;
FVector WorldLocation = UKismetMathLibrary::Conv_IntVectorToVector(GridCell) * VoxelSize; Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?