armory3d / armory3d/armory

Rotator code is totally incorrect

Open
#2,167 0 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

**Description**
Roll, pitch and yaw do not constitute a vector. In practice it means that:
* When you add, subtract, multiply, interpolate, normalize orientations as vectors, you get meaningless quantities
* The (roll, pitch, yaw) triad does not define the rotation axis direction
* The final orientation depends on the order in which the roll, pitch and yaw rotations are applied
* There are orientations that are not representable by roll, pitch and yaw

You have to do one of the following:
* Treat roll, pitch and yaw as separate scalars that obey the Euler equations
* Represent orientation by a 3 x 3 rotation matrix
* Represent orientation by a quaternion

Options 2 and 3 imply that roll, pitch and yaw, if needed, are computed by request and never used for intermediate computations.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name an implementation file, test, or entry point. Start by locating the Rotator implementation and its orientation operations, then determine which representation the project should use; done means orientation composition and related operations no longer treat roll, pitch, and yaw as a vector.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics, game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.