-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I would like to suggest moving away from using euler angles which are numerically unstable, to quaternions which are more stable and more consistent in interpolation, regarding that I have these suggestions:
- Add a quaternion rotation property to EntityPos:
- Mark Roll as deprecated
- (This may be a breaking change) Make it so Yaw always rotates around global Y, and Pitch rotates around local Left (or Right), this can be implemented via introduction of new Yaw and Pitch and marking the old ones as deprecated
- Add a bool UseEuler field to EntityPos which would default to true
- Add Quaternion rotation getter to EntityPos which depending of the state of UseEuler would either use local quaternion value or calculate one from euler angles (preferably with caching)
- Make rendering (and probably also other places which I don't know about) use the Quaternion field instead of euler angles directly
- Split Interpolation behavior into Quaternion interpolation behavior and Euler interpolation behavior
- Add Typesafe Quaternion api i.e. Quaternion class analogus to Vec3d or Vec3f or any other vector
- Also do the same thing for matrices (I don't know why they use arrays instead of proper classes)
Metadata
Metadata
Assignees
Labels
No labels