So I'm making a facebook game that uses the maps api (map3d to be
precise) and I have a number of units on the map.

I've got the initial lat/long for them and I want to do the usual
integration for movement: i.e.

newposition = oldposition + velocity * time;

What I'm doing is taking the latlng and converting it to world space
coordinates via the ICamera interface. I am then doing the integration
with the Point's that are returned.

Only I'm hitting the limits of floating point precision for the Point
class. If I do my usual approach of scaling a unit 2D vector (a point
with length 1 in the direction of movment) by the speed I want the
unit to travel to get velocity, I get a small floating point number
which when added to the oldposition results in no change!

I managed to fix a bit of this by reorganizing some of the maths so
that it uses a different order and uses explicit NUMBER types rather
than using point (I'm assuming the get/set operations are messing with
the precision in some way).

I'm wondering if there isnt a better way to integrate one lat/lng with
another to get a proper movement for my markers? Anyone got any
thoughts on how to smoothly move a unit around the globe with enough
precision to have a useful range of speeds that are "realistic" to
real-world vehicles?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en.

Reply via email to