| ||
So, now you have a few more tools for your toolbox. Here they are.
Convert angular velocity to x, y velocity:
vx = speed * Math.cos(angle); vy = speed * Math.sin(angle);
Convert angular acceleration (any force acting on an object) to x, y acceleration:
ax = force * Math.cos(angle); ay = force * Math.sin(angle);
Add acceleration to velocity:
vx += ax; vy += ay;
Add velocity to position:
movieclip._x += vx; movieclip._y += vy;
| ||