Flash player 10 has come with a ton of cool new built in function that provide easy solutions to classic gaming problems. For Example:
distance(pt1:Vector3D, pt2:Vector3D):Number
[static] Returns the distance between two Vector3D objects.
pointAt(pos:Vector3D, at:Vector3D = null, up:Vector3D = null):void
Rotates the display object so that it faces a specified position.
But one of the most seemingly useful methods confuses me, or I’m just using it wrong.
angleBetween(a:Vector3D, b:Vector3D):Number
[static] Returns the angle in radians between two vectors.
Does anyone have any experience with this or got it working with rotation? Maybe it’s not possible for use because its returning a 3-dimensional angle…
Anyway, anyone find any other practical uses for these new methods? Are these built-in methods faster than the previous way of finding distance, angle etc.?