Collision Detection with OBBs

When I'm using a BoundingBox for my collision detection everything seems to work fine. However, when I use a OrientedBoundingBox instead…it simply stops detecting collisions.  I can see the OrientedBoundingBox bounds displaying correctly in game… works fine with rendering.  I'm not merging it with any other BoundingVolumes… it just doesn't pick up collisions.  Can't quite figure it out. 



Also, I'm using Standard Game. When I tried the same thing in the simple game collision detection test files it worked fine.



Any help would be appreciated.

The only distinction I can think between StandardGame is going to be you need to call updateXXX on the spatial since StandardGame starts the graphical thread immediately whereas in SimpleGame it instantiates everything first and then starts the graphical thread (and internally updatesXXX on the rootNode).

darkfrog said:

The only distinction I can think between StandardGame is going to be you need to call updateXXX on the spatial since StandardGame starts the graphical thread immediately whereas in SimpleGame it instantiates everything first and then starts the graphical thread (and internally updatesXXX on the rootNode).


When I use any other bounding volume collisions, they work fine... sphere-sphere, sphere-box, etc etc... when ever I use the OrientedBoundingBox with another bounding volume I get nothing. 

When I use an OBB vs an OBB I get some collisions...but they are random and way off comparing to other bounding volumes collisions. For example a collision wont be registered until my OBB has almost completely passed through another OBB etc.

I still think it's going to have to either do with an update not being called after the boundaries change or you might just need to wrap the whole thing in a GameTaskManager update call and see if that makes a difference?

I tried throwing the whole thing in a GameTaskeManager update… same thing.





I should also note that I am loading models into these nodes.





I did figure it out more today… when I compare the node with the model loaded in it vs just a box shape everything works fine.  When I do a box vs a box everything works fine.  When I do a model vs a model… it's weird… it's like only a small portion in the center of the model detects collisions.



I doubled checked again and I am calling the updates.



Still at a loss on what to do for this one :confused:






And everything works fine if you don't use StandardGame?