[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 2chのread.cgiへ]
Update time : 05/10 14:37 / Filesize : 200 KB / Number-of Response : 863
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

【みんな】XNA 質問・相談スレッド1【初心者】



412 名前:405 mailto:sage [2009/05/06(水) 23:25:46 ]
>>411
this.baseBoundingBox = BoundingBox.CreateFromSphere(baseBoundingSphere);
と書き換え、

// 各モデル用の包括球半径設定
this.sphere1BoundingSphere.Radius = this.baseBoundingSphere.Radius;
this.sphere2BoundingSphere.Radius = this.baseBoundingSphere.Radius;
this.box1BoundingBox.Max = this.baseBoundingBox.Max; ←Radiusの代わりにMaxとMinがあったので
this.box1BoundingBox.Min = this.baseBoundingBox.Min; 書き換えました

// 衝突判定用の球と箱を設定
this.sphere1BoundingSphere.Center = this.sphere1Position + this.baseBoundingSphere.Center;
this.sphere2BoundingSphere.Center = this.sphere2Position + this.baseBoundingSphere.Center;
this.box1BoundingBox.Max = this.box1Position + this.baseBoundingBox.Max;
this.box1BoundingBox.Min = this.box1Position + this.baseBoundingBox.Min;

// 球1と箱の衝突判定
this.isCollision = this.sphere1BoundingSphere.Intersects(this.box1BoundingBox);

と書き換えた結果、実行は出来たのですが
当たり判定の箱の大きさが長方形に合いませんでした。

koideai.com/up/src/up19910.png
koideai.com/up/src/up19911.png
koideai.com/up/src/up19912.png

このようになってしまいます。
MaxとMinの設定が間違っているのでしょうか?






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<200KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef