Skip to content

matrix.extractRotation() returns incorrect rotation matrix when scale is negative #14158

@arodic

Description

@arodic

setFromRotationMatrix is incorrect when scale is negative on any axis. matrix.decompose returns correct rotation.

I assume this is because the following code is missing in setFromRotationMatrix (present in matrix.decompose):

// if determine is negative, we need to invert one scale
var det = this.determinant();
if ( det < 0 ) sx = - sx;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions