UE4 C++ Rotating a mesh

I just want to know how to rotate a mesh in C++. I don´t understand why i cant find a tutorial for this.
Why i cant use simply thing like this: GetMesh()->SetRotation();

Meshes are objects that form part of components which in turn should belong to and is usually attached to an actor. It should be the actor’s responsibility to set the rotation of the mesh component under normal circumstances. There is also no reason why the mesh object itself (as opposed to the component) needs to know anything about its location.

If you want to apply additional custom local offsets you should use SetRelative* functions on the Component e.g. GetMeshComponent()->SetRelativeRotation().

1 Like