UKismetSystemLibrary::MoveComponentTo
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Latently interpolates a scene component to a target relative location and rotation over a fixed duration. Commonly used for simple, self-contained door, platform, or prop animations without a full timeline or animation asset.
Caveats & Gotchas
- • MoveAction exposes three execution pins in Blueprint (Move/Stop/Return) via ExpandEnumAsExecs, so the node's shape in the graph doesn't match a typical single-output latent function — check which pin you wired.
- • This moves the component directly by setting its relative transform each tick; it does not use physics or sweep for collision by default, so it can visually clip through geometry along the path.
- • 'Return' interpolates back over the time already elapsed, not over a fresh OverTime duration — a move interrupted early returns quickly, one interrupted late returns slowly.
Signature
static void MoveComponentTo(USceneComponent* Component, FVector TargetRelativeLocation, FRotator TargetRelativeRotation, bool bEaseOut, bool bEaseIn, float OverTime, bool bForceShortestRotationPath, TEnumAsByte<EMoveComponentAction::Type> MoveAction, FLatentActionInfo LatentInfo); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Component | USceneComponent* | Component to interpolate. | — |
| TargetRelativeLocation | FVector | Target location, relative to the component's attach parent. | — |
| TargetRelativeRotation | FRotator | Target rotation, relative to the component's attach parent. | — |
| bEaseOut | bool | If true, the interpolation slows down as it approaches the target. | — |
| bEaseIn | bool | If true, the interpolation starts slowly and accelerates. | — |
| OverTime | float | Duration of the interpolation, in seconds. | — |
| bForceShortestRotationPath | bool | If true, rotation always takes the shortest path rather than the literal delta between start and target. | — |
| MoveAction | TEnumAsByte<EMoveComponentAction::Type> | Whether to start moving to the target, stop where it currently is, or return to its starting transform. | — |
| LatentInfo | FLatentActionInfo | Hidden latent action bookkeeping struct auto-filled by the Blueprint compiler. | — |
Return Type
void Example
Slide a door open (Blueprint) Blueprint
Event graph: on 'Open Door' custom event, call MoveComponentTo on the DoorMesh component with TargetRelativeLocation offset along the door's local X axis, OverTime = 1.0, bEaseOut = true, MoveAction = Move. Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?