Bounding box and rotating

Problems building or running the engine, queries about how to use features etc.
User avatar
Mr_Ridd
Goblin
Posts: 297
Joined: Fri Jun 04, 2004 10:01 pm
Location: South Africa
x 1

Bounding box and rotating

Post by Mr_Ridd »

Hey, if I have an object, say a mesh of a car for example and I rotate it, the bounding box doesn't rotate with it, it only increases or decreases in size. If I am, for instance, taking a corner, it means my car will be at an angle. If I had to do a collison test with my car and another car behind me it would result true because the bounding box hasn't rotated with the car.

Perhaps this image will clear things up:

Image

Is there a way to overcome this?

Thanks
The ability to succeed is the ability to adapt
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8

Post by haffax »

This is, because the bounding box is axis aligned. It is definitly not appropriate for fine grained collision detection. The best option is probably to use a specialized engine for it, like ODE or OPCODE. Personally I'd recommend OgreODE in the ogreaddons. It is easy to use and has many useful examples delivered with it. Even a car demo. :)
team-pantheon programmer
creators of Rastullahs Lockenpracht