- 366 名前:名前は開発中のものです。 mailto:sage [2006/11/02(木) 02:21:07 ID:6pO4WTip]
- atanいらんのでは?
#define DEG2ANG(deg) ((deg)*PI/180.0) vx = enemy_x - myship_x; vy = enemy_y - myship_y; l = sqrt(vx*vx+vy*vy); vx = vx / l; vy = vy / l; speed = 弾のスピード; new_vx = vx * sin(DEG2RAD(15))*speed - vy * cos(DEG2RAD(15))*speed; new_vy = vy * sin(DEG2RAD(15))*speed + vx * cos(DEG2RAD(15))*speed; 確かめてないので符号とか間違ってるかも
|

|