Hello,
I have a "spaceship" that uses a BoundingSphere to detect collision. It works properly, and when I display it on the screen it is in the right place (updating with the ship's position). I also have a series of buildings that the ship can crash into, and they use BoundingBoxes. These also are in the right position when I draw them. The problem comes when the BoundingSphere of the ship collides with the BoundingBox. For some reason, it only detects collision for one face of the box, not the entire box. So, I was wondering, is there a way to fix that?
This is the code I use for collision, pretty basic:
| public bool CollidesWith(BoundingBox box) |
| { |
| return (sphere.Intersects(box)); |
| } |