C++: How to point a mesh into s specific direction using all 3 rotation axis ?
Hi,
i am totally new to UE4 C++, so sorry for asking noob questions…
I am trying to make a Radar-Antenna animation in C++…
What i managed to archive so far:
-
Placing an actor with a mesh in the UE4 Editor
-
Manipulate the actor with C++ Code, changing Position with a Vectors work fine.
-
Rotate the mesh using the FRotator.ROLL in the Ticker works fine too… I get a rotating mesh in the right place so far.
-
At least i want to make the antenna sway up and down using the pitch rotation.
That code gives me a weird reaction, so the antenna pitches up and down fine while starting, at 90 mesh degree roll it only twists itself.
I think, that the base orientation of the Pitch-Axis is not changing with the mesh is rotating around the rolling axis, it always refers to the spwan position of the actor
Is there a solution, to have the y-axis always depend on the poition of the x-axis, i.e. rotate it with any rotation input ?