• News

• Industries

• Learning & Support

• Community

• Marketplace

# Rotation formats in blueprints

My immediate problem is that “Set Physics Angular Velocity” takes an axis-angle as input, yet there is no convenient way to actually convert Rotators into axis-angles. Seriously?
https://docs.unrealengine.com/latest/INT/BlueprintAPI/Physics/SetPhysicsAngularVelocity/index.html

Ironically, there is a function to convert an Axis Angle to Rotator – just no way to convert back. Seriously?
https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Rotator/RotatorfromAxisandAngle/index.html

Fortunately, I know the math to convert between rotation formats, and could easily implement an “Axis Angle from Rotator” function myself. Indeed, the most numerically stable way to convert a Rotator (Euler angle) to an Axis-angle vector, is to first convert the rotator to a quaternion, and then from quaternion to axis-angle.

Unfortunately, there are no blueprint functions available for converting to/from quaternions in blueprints. Seriously???

*The quaternion is the most ubiquitous structure for representing rotations in the modern era. Even behind the hood, you are constantly converting the rotator back and forth to quaternions every time it is put in, or extracted from a Transform, or anytime combine rotators is used…and yet you do not allow game developers to access this obviously very important structure???
*

Fortunately, I also know the math to convert from a Euler angle to a quaternion and back, and could easily implement such a function.
There is a “Quat” structure built into blueprints, as evidenced by the “Make Quat” and “Break Quat” functions…so I could write my own function library using this structure, right?

Unfortunately, despite the fact that it EXISTS, the “Quat” structure is not available in the list of variables that can be chosen for inputs/outputs on user-created blueprint functions. Seriously?

Fortunately, I could just make my own quat structure using a 4-vector…oh wait, no, I can’t, because there are no 4-vector structures I could use. I guess I have to represent quaternions using 4 outputs, “qx, qy, qz, qw” ?

Ugh. Seriously?

I don’t care if you leave Rotators as the default rotation format – but it is seriously a problem when you don’t provide structures for converting to other, more practical, rotations formats such as axis-angle and quaternion. Please add these functions in so that blueprints aren’t intentionally crippled in comparison to C++.