角速度轉換為 x, y 速度:
vx = speed * Math.cos(angle);
vy = speed * Math.sin(angle);
角加速度(作用於物體上的force)轉換為x, y 加速度:
ax = force * Math.cos(angle);
ay = force * Math.sin(angle);
將加速度加入速度:
vx += ax;vy += ay;
將速度加入坐標:
movieclip._x += vx;sprite.y += vy;
沒有留言:
張貼留言