Friday, April 18, 2008

Wistfuly, it's Friday


I finally got a meddlesome piece of ActionScript to work correctly. The bullet in the cannon test now begins its flight from the end of the cannon, as opposed to the cannon's center of rotation. When the bullet started in the center of the cannon I had to set a minimum charge of 15 or the bullet would fall out of the cannon or the barrel in an unrealistic manner. The bullet also had some lame trajectories if the cannon were angled toward 90 degrees. Now, the bullet starts from the end of the barrel and low charges are fine. I used the mystical arts of trigonometry to calculate the dx and dy offsets that change as the cannon (constant length of r) rotates (angle a). In any event, I had been trying to get this to work in ActionScript and it was just not happening for me. Until now. . . And then I ate two donuts.

1 comment:

JulieVondracek said...

Where'd you get the donuts?