GMS0012

hello,
how can i use a bounding box with 2d...
must a bounding box always be a box (a rectangle) or can i "draw" it around my object
thx


Re: XNA Framework bounding box with 2d

JDBW






Re: XNA Framework bounding box with 2d

dczraptor

bounding boxes are always axis-aligned, so you can only have straight orthogonal edges. To make a 2D bounding box, simply set the Z coordinate of the corners to 0, and you can use it just like a 3D one.l




Re: XNA Framework bounding box with 2d

GMS0012

can i draw something around my object to detect collisions.. i am not talking about pixel collision detection.. just a little bit more precisely than a box
thx




Re: XNA Framework bounding box with 2d

Jim Perry

Depending on the shape of your object multiple boxes or circles can be used to tighten up the collision detection. I thought one of the tutorial sites had something on it, but I can't find it.