シューティングゲーム ..
[2ch|▼Menu]
366:名前は開発中のものです。
06/11/02 02:21:07 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;

確かめてないので符号とか間違ってるかも



次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5333日前に更新/168 KB
担当:undef