UKismetMathLibrary::Conv_VectorToTransform
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Creates an FTransform with the given location, identity rotation, and uniform scale of 1. Useful when you only need to encode a position as a full transform.
Caveats & Gotchas
- • Rotation is set to FQuat::Identity and scale to FVector(1,1,1). If you need non-identity rotation or scale, construct FTransform(Rotation, Location, Scale) directly.
- • This is a BlueprintAutocast node — Blueprint silently inserts it when a Vector pin connects to a Transform input. This implicit conversion discards any rotation you may have intended to carry along.
Signature
static ENGINE_API FTransform Conv_VectorToTransform(FVector InLocation); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InLocation | FVector | The location to use as the translation component of the resulting transform. | — |
Return Type
FTransform Example
Use a patrol path point as a full spawn transform C++
FVector SpawnPoint = PatrolPath[CurrentIndex];
FTransform SpawnTransform = UKismetMathLibrary::Conv_VectorToTransform(SpawnPoint);
GetWorld()->SpawnActorDeferred<AEnemy>(AEnemy::StaticClass(), SpawnTransform); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?