away3d / away3d-core-fp10

Away3D engine for Flash Player 10

Home Page:http://www.away3d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LookAt function forcing update even if no transformation occured

JonathanPaquinLafleur opened this issue · comments

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);