avoid decompose function returns (NaN,NaN,NaN) as the rotation