Maths

Ever traced tank.turret.rotation and found that it always returns zero, even when it’s clearly pointing diagonally?

Maybe you’ve compared the width of two identical objects, one obviously double the size of the other, and found that Flash thinks they are the same.

Every Flash dev I know has run across one of these and sat scratching their head — myself included!

So what’s going on?

Well, it’s all to do with addChild()

{ 31 comments }

Pythagorean Distance Between Two Points

by Michael James Williams on May 8, 2009 · 26 comments

in Maths

Learn about Pythagorean distance for working out how far apart two objects are in AS3 and Flash games, in 2D, 3D and 4D. Also explains Pythagoras’ theorem and introduces Euclidean space.

{ 26 comments }