Bounding

Hi,



I'm a little confused by all of the bounding options avaliable.  What I have is a 'car' consisting of a chassis and 4 wheels.  For collision detection (non-physis)  I only want the car to be bounded by a single box, so that it is easier to hit targets (the wheel or chassis won't really have to touch)…



So, I've been looking through the jME source.  A BoundingBox makes the most sense to me, because it is the right shape, but there are a few conceptual things I am trying to grab here.


  • How do I get the BoundingBox to contain the whole car?

  • Which Geometry should the BoundingBox be attached to?

  • What exactly is an OBBTree... sounds cool, but I don't really understand it



Whatever you can help me with here would be great... thanks :D
webaf409 said:


  • How do I get the BoundingBox to contain the whole car?

  • Which Geometry should the BoundingBox be attached to?



In case it's still relevant: Set a bounding box for each of your Geometries and update the model bounds. Then update the world bounds of your car -> whole car should be contained in the resulting world bound. Most likely you would want to use oriented bounding boxes (compare the types by showing bounds in your app).

OBB = Oriented bounding box. OBBTree is used internally for computing oriented bounding boxes (tree structured).