OrientedBoundingBox not detecting collisions

I'm having a bad time with collisions between an OrientedBoundingBox and a BoundingBox :cry:

The OrientedBoundingBox shows up correctly in the Debugger, and it follows my model correctly too.

The OrientedBoundingBox is around a loaded model, while the BoundingBox is bounding a Box.

It works if I use BoundingBoxes only (but for my model I need an OrientedBoundingBox).

I read some posts but nothing conclussive. Has anyone experienced something similar?


It actually detects a few collissions, but they are missplaced :-s

I remember having such problems in my early jME days… one reason I joined/made jME Physics. Seems someone needs to dig into the collision code :expressionless:

:s oh…

How strange nobody has faced this before?

I will have a look tonight but I already checked the "OrientedBoundingBox.intersectsBoundingBox" code and it's too difficult for me.

If anyone know at least the algorithm being used, please tell me, that'd be great.

Here’s a list of algorithms of nearly all possible intersection tests, maybe you could implement one from it if the current one in jme is not working and no-one remember how it should work.


Thank you very much Haladria.

I have reviewed this and I will be having a look at it.


Ok I implemented the code at http://www.ziggyware.com/readarticle.php?article_id=13.

Amazing, I basically used “search and replace” to translate that :D.

It works, except that for some reason, my tank slightly penetrates other boxes :?. Only slightly, but collision is detected from all sides correctly.

Ok, I spent the whole day yesterday trying to fix this.

Implemented another collision method. It now detects collisions in the right place but it looks like it allows some penetration.

I am also a bit lost about how ModelBound works across the node hierarchy:

  1. it seems that if you set a ModelBound on parents you replace ModelBound on children but only if they already had a ModelBound?

  2. how is ModelBound related to WorldBound?

    In any case, even with OrientedBoundingBox to OrientedBoundingBox, the new algorithm works a bit better but it is still not correct.

    I desperately need help here :frowning:

    By the way, the code works correctly with normal BoundingBoxes, but well, I need to use OrientedBoundingBoxes.

I'm sorry I can help fixing the Problem.

But perhaps you can put a real box in the orientedBB, and than make triangleCollsions.