Can you make Controller (Pitch/Yaw) use Double-Precision Float?

Context, I’m trying to rotate the camera around the earth (so it acts more like google earth, pan up, down, left, right with camera always facing earth center) so I have a camera boom at 0,0,0 stretching way out 650,000,000+ when the whole earth is in frame the rotation speed is great, but when near the surface the camera rotates way too fast.
problem is when setting rotation speed so low the double precise float gets cut to 0. If the controller input accepted doubles it should be fine.

Any ideas? Can I go into the playercontroller c++ class and change the pitch/yaw input to a double? or will that break things.

edit: I realize the distance values are absurd, but that’s what cesium defaults to.

Hi @CloudStrife8000! First, the Add Controller Yaw Input node and other rotation-related nodes on pawns only take single-precision floats. They’re methods provided by Unreal, and even if we wanted to change them, Unreal still uses single-precision floats internally for rotations. The unfortunate consequence of this is that even if you did all of your own double-precision rotation math, you would still need to cast your resulting angles to floats to actually apply them to the pawn.

What you can do is calculate the transformation yourself and set the resulting position directly on your camera. In C++ you have access to glm, which has glm::dvec3 and glm::dquat among other types that support double precision. Each frame, you take the Earth-Centered, Earth-Fixed position of the camera and rotate it by a new glm::dquat you create representing your rotation values. Since ECEF coordinates are earth-centered, this is the equivalent of rotating your camera boom. You can gain the ECEF coordinates of your object either by using the GetEarthCenteredEarthFixedPosition method on a CesiumGlobeAnchorComponent, or by using the TransformUnrealPositionToEarthCenteredEarthFixed method on a CesiumGeoreference.

Let me know if you have any further difficulties!