LookAt function forcing update even if no transformation occured
JonathanPaquinLafleur opened this issue · comments
Jonathan Paquin Lafleur commented
The function lookAt(target : Vector3D, upAxis : Vector3D = null) in Object3D should verify if the new matrix does some kind of transformation so that:
_rotationDirty = true;
notifySceneTransformChange();
Does not get called even if no transformation has been applied.
The following condition was used in Away3D 3.4 which prevented this problem.
if (_zAxis.modulo > 0.1 && (_zAxis.x != _transform.sxz || _zAxis.y != _transform.syz || _zAxis.z != _transform.szz))
{
_xAxis.cross(_zAxis, upAxis || Number3D.UP);