[Closed] No quaternions in Actors and Components ?
I'm working on a space game. Obviously this requires the controls to be in full 3D, being able to move a ship pointing to the Z axis for example.
The issue is that SetActorRotation or MoveComponent only take FRotators as parameters. Worse than that, they also appear to store FRotators internally. FRotators are subject to a -90 +90 issue on pitch and thus are unusable in my case.
So, is it possible to avoid gimbal lock with UE4 ? What are quaternions good for if the internal representation is fundamentally unreliable ?
asked Jul 13 '14 at 11:25 AM in C++ Programming
The question has been closed Apr 27 '15 at 09:39 AM by StrangerGwenn for the following reason:
The question is answered, right answer was accepted
After some digging around I think this can be done "correctly" using a USceneComponents ability to attach to a socket of another USceneComponent. If you made your own version of a USceneComponent like UQuatSceneComponent that provided a single socket, you can override HasAnySockets(), GetSocketTransform(), and QuerySupportedSockets() and use that to provide full rotational control using an FQuat.
A good example here would be to look at the SpringArmComponent which is what gave me this idea.
Follow this question
Once you sign in you will be able to subscribe for any updates here