Hi,
Congrats for your amazing work.
I have recently updated the trunk, and it seems HoverCamera3D.hover()
doesn't return 'false' anymore.
In order to figure this out, here are a few test lines i wrote in
HoverCamera3D.as :
"[...]
var gx:Number = target.x +
distance*Math.sin(_currentPanAngle*toRADIANS)*Math.cos(_currentTiltAngle*toRADIANS);
var gz:Number = target.z +
distance*Math.cos(_currentPanAngle*toRADIANS)*Math.cos(_currentTiltAngle*toRADIANS);
var gy:Number = target.y +
distance*Math.sin(_currentTiltAngle*toRADIANS)*yfactor;
//test// trace ("x (" + x + ") == gx (" + gx + ") ?");
//test// trace ("y (" + y + ") == gy (" + gy + ") ?");
//test// trace ("z (" + z + ") == gz (" + gz + ") ?");
if ((x == gx) && (y == gy) && (z == gz))
return false;
x = gx;
y = gy;
z = gz;
//test// trace ("x final = " + x);
//test// trace ("y final = " + y);
//test// trace ("z final = " + z);
return true;
[...]"
And here is what i get in the output, as the camera is no longer
updated :
"[...]
x (7852.2958984375) == gx (7852.296056215698) ?
y (6446.26171875) == gy (6446.2618632336935) ?
z (9358.001953125) == gz (9358.002035108404) ?
x final = 7852.2958984375
y final = 6446.26171875
z final = 9358.001953125
camHasMoved ? true
x (7852.2958984375) == gx (7852.296056215698) ?
y (6446.26171875) == gy (6446.2618632336935) ?
z (9358.001953125) == gz (9358.002035108404) ?
x final = 7852.2958984375
y final = 6446.26171875
z final = 9358.001953125
camHasMoved ? true
..."
It seems there is a decimal precision problem between gx/gy/gz Numbers
(12) and x/y/z cam properties (10).
What do you think?
Thanks in advance for your help.
Nicolas