kottore / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

HoverCamera3D has hard-coded termination value which should be a property #85

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In away3d.cameras.HoverCamera3D, there is a hard-coded constant of 0.01
which is used to decide when hovering has completed; when tiltangle and
panangle have gotten within 0.01 degrees of targettiltangle and
targetpanangle, hovering is done. Unfortunately, on many projects this is
far too precise, and the camera continues to converge for a while after
being visually "there". If the application does something when hovering
finishes, or CPU power is at a premium, this will be a problem.

I suggest adding a new property, "closeenough", which defaults to 0.01, and
is used instead of the current hard-coded "0.01". Having too-large a value
of closeenough means that there's a jerk at the last moment, but in my
current project I've found that a value of 0.1 works well and avoids a
delay at the end of the hover.

Original issue reported on code.google.com by dtgriscom@gmail.com on 27 Nov 2009 at 8:25