# Transformation matrix

**URL:** <https://forums.unrealengine.com/t/transformation-matrix/412239>\
**Category:** C++\
**Tags:** projection-matrix, unreal-engine, CPP, question\
**Created:** [December 14, 2017, 10:59am UTC](https://forums.unrealengine.com/t/transformation-matrix/412239 "2017-12-14T10:59:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_40078cc7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_40078cc7](https://forums.unrealengine.com/u/anonymous_user_40078cc7)\
**Post date:** [December 14, 2017, 10:59am UTC](https://forums.unrealengine.com/t/transformation-matrix/412239/1 "2017-12-14T10:59:09Z")

</div>

Hi, I have a transform matrix (4x4 → composed from 3x3 Rotation matrix and a 3x1 Translation vector) received from TCP connection.  
How can apply this matrix to an actor?

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [December 14, 2017, 12:58pm UTC](https://forums.unrealengine.com/t/transformation-matrix/412239/2 "2017-12-14T12:58:54Z")

</div>

Use SetActorTransform or SetActorRelativeTransform depending on your needs. I attach the links to the documentation. The parameter of type FTransform can be built from a matrix, or separate from Translation and Rotation (and Scale) in your case.

> **[AActor::SetActorTransform](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/AActor/SetActorTransform/)**
>
> Set the Actors transform to the specified one.

> **[AActor::SetActorRelativeTransform](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/AActor/SetActorRelativeTransform/)**
>
> Set the actor's RootComponent to the specified relative transform
