I’ve been implementing a blueprint transform gizmo to translate and rotate actors at runtime in my build game. I have the translation working correctly, but I’'m struggling with the rotation aspect. There’s not a huge amount of info I could find online about how to do this. I’ll post a couple of links to what I have found. From what I understand, the best way to do this is using quaternions, but my understanding of them is lacking a bit.
The method described in this first link (Implementing simple translation and rotation gizmos // My thought repository) doesn’t use quaternions, but seems to just basically be a LookAt function between the actor and the ray-plane intersection. So the mouse must orbit the object to rotate it.
his second explanation seems to be more what I’m after, but I’m struggling to grasp this and translate it to blueprint (3d - How to translate mouse movement to a rotation gizmo? - Computer Graphics Stack Exchange).
I have the Blueprint quaternion library plugin, so have access to a lot of quaternion functions if need be. Currently I’m creating a plane with a normal equal to the axis of rotation, and doing a line-plane intersection from the mouse position to find an intersection point on that plane. I just don’t know how to translate the mouse movement to a rotation.
Any help is much appreciated!