[NxOgre 0.9] Size of collision bounding boxes problem?

tiagomelobr

18-04-2008 23:15:43

Hi all,

My first post here.

I have been unable to find the right size for bounding boxes. I have in my game simple crates only.


The crates are all 1x1x1 size. There is a bigger box, that i´m using as floor. The bounding boxes of the crates "seems" correct. But it isn´t. When i´ve debug them i see that the bounding boxes are a 'little' bigger. The problem is the bounding box for the larger box, that is visible larger than the correct.


When using node->showBoundingBoxes(true) i´ve discovered that the bounding boxes are a little larger.

I´ve used the getMeshManager()->setBoundsPaddingFactor(0.0);. This way the bounding boxes in Ogre looks all correct, but in NxOgre all the objects seems to enter a little bit in others. (The collision is correct only on the real floor (y=0)).


There a standard way of using this? I have in my game crates from 1x1x1 to 10x10x10.


Sorry if this is duplicated.


Regards,
Tiago Melo
http://www.lumentech.cc

betajaen

18-04-2008 23:34:09

Due to some inaccuracy when stacking objects in PhysX, it uses a thing called "skin-width" to allow each object penetrate each other ever so slightly. That's why you see them like that, it's perfectly normal and unavoidable (if you don't have skin-width; the actors jitter and become unstable).

Like you said, Ogre does add some padding to the bounding boxes, but again this is a normal process and nothing to be worried about.

tiagomelobr

19-04-2008 00:00:42

Thank´s for the quick answer!


I see... and if i set the setBoundsPaddingFactor(0.0), and add to all my objects in CubeShape something in all dimensions (x + 0.02,y + 0.02,z + 0.02) for example?


This is correct?
I´ve made these changes and all seems ok, but i don´t know if i will get any problems later.



Tiago Melo