Hey there!
Thanks for the help, I got this along pretty far turning into an
actual function that works with my stuff...but im still not getting it
to work...it doesnt turn the actual coords into matching ones from the
MouseEvent3D.
Is there something wrong with the var r:Number part? Does that formula
return the radius from he center point? I know the radius and I am not
quite sure that it would match, but I dunno the actual match here...
var _x:Number = e.sceneX;
var _y:Number = e.sceneY;
var _z:Number = e.sceneZ;
var r:Number = Math.sqrt(_x*_x + _y*_y + _z*_z); //
radius from
center of the earth to your point
var theta:Number = Math.acos(_z / r); // LAT in radians
var phi:Number = Math.atan2(_y, _x); // LON in radians
// Convert from radians above to degrees
var lat:Number = theta * 180 / Math.PI;
var lon:Number = phi * 180 / Math.PI;
trace("LON :: ", phi, "\nLAT :: ", theta);
addMarker(-lat, -lon);
To unsubscribe from this group, send email to
away3d-dev+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.