How do I rotate an object using a motion controller?

(This is not a VR project, so unfortunately none of the newly added XR-controller nodes are useful to me)

  • I need to rotate an Actor in 3x360 degrees using a motion controller joypad.
  • I try to get smooth, shortest-distance transitions, which probably means I need to use quaternions.
  • I have VS2019 installed but this project is BluePrint only.

My motion controller outputs in radians:
Pitch: +/- 1 radian (-3.142 to 3.142)
Yaw: +/- 1 radian (-3.142 to 3.142)
Roll: +/- half a radian. (but I can calculate a full radian using the Pitch value)
(I get these values using the node “Get Input Motion State”)

So my question would be: How do I properly convert these radian values into quaternions?
And how do I rotate an Actor using these quaternions?

Thank you tons in advance.
Help massively appreciated.

You can try to use Make from Euler node (it makes Quat from Euler angles). The next thing - you can create Make Rotator node with angles (pitch, yaw, roll) and convert it to Quat. And one more thing - you can just use Deltas with AddActorLocalRotation node or AddActorWorldRotation node.

Hello & thanks for the reply!

I have tried the Euler-Quat conversions and they work fine. The problem is just that before rotating an actor, you have to convert back to Eulers (as all the AddActorRotation nodes are exclusively taking Euler-inputs) which kinda defeats the purpose of converting to Quats.

How I see it is: Unless I am able to add a quaternion rotation to an actor directly, I will always have the classic Euler-problems like gimbal lock or distorted interpolations between two rotations.