【みんな】XNA 質問・相談スレッド1【初心者】at TECH
【みんな】XNA 質問・相談スレッド1【初心者】 - 暇つぶし2ch412:405
09/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);

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

URLリンク(koideai.com)
URLリンク(koideai.com)
URLリンク(koideai.com)

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


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch