Page MenuHomeFeedback Tracker

Math3D::MatrixToAnglesAndScale and Math3D::MatrixToAngles return invalid angles when scaled
Closed, ResolvedPublic

Description

When using MatrixToAnglesAndScale the order of angles is wrong.

vector mat[3];
Math3D.AnglesToMatrix( "1 2 3", mat );
SCR_Math3D.ScaleMatrix(mat, 5);
vector ang;
float scale = Math3D.MatrixToAnglesAndScale(mat, ang);
Print(ang);
Print(scale);

SCRIPT : vector ang = <2,1,3>
SCRIPT : float scale = 5

The expected output would have been <1,2,3>.

Even worse when using MatrixToAngles it just does whatever happens here in the correct order but the wrong value

vector mat[3];
Math3D.AnglesToMatrix( "1 2 3", mat );
SCR_Math3D.ScaleMatrix(mat, 5);
vector ang = Math3D.MatrixToAngles(mat);
Print(ang);

SCRIPT : vector ang = <1,10.0494,3>

The expected output would have been <1,2,3>.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

Arkensor created this task.May 9 2023, 2:19 PM
Geez changed the task status from New to Assigned.May 10 2023, 11:07 AM
Geez closed this task as Resolved.May 15 2023, 12:02 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Fixed internally and should be fixed for one of the future updates.