BSP Collision

juanmarcus

25-09-2007 16:27:26

Hello Everyone XD

I'm been working with OgreOde for some time, using it in this game i'm making. I use the version from tuan's website.

First of all, i realized that most of the BSP collision code in OgreOde comes from the reference application by sinbad. I managed to undestand the whole thing and found some bugs. I'll try to explain some of them and then get to my own problem XD

When a mesh object wants to collide with the world geometry, OgreOde creates a infinity plane geometry to check for collisions. This infinity plane causes a null pointer error, because it is getting a 0 pointer to world.


InfinitePlaneGeometry *sliding_plane = new InfinitePlaneGeometry(*boundPlane, 0);


After fixing that, besides the fact that memory usage keeps raising like hell, some weird behavior comes into play. (you can see that when you shoot the ball on the column on the ref app). The infinity planes are far from being the right thing to do here in my opinion.

To fix that, I rewrote part of the collision code. Instead of infinite planes, I use an axis aligned box geometry, generated from the six incoming planes that the intersection query gives me. That gives me correct "corner" collision, assuming that the query returns always 6 planes, which is not true.

If the world fragment is not an AAB, the query sometimes returns 8, 10 or even 13 planes. Which means: my code only work if the BSP is made only of AAB.

Dispite that, i was very happy to see my little car colliding with stairs :D :D :D

Now to questions:

Am I far behind everyone else and working on something really outdated? because when ir comes to OgreOde BSP Collision, i found near zero information.

Any tips for me? suggestions? anything? swering me?

If anyone is interested, i can show the code.

rewb0rn

25-09-2007 17:35:32

well yes you should upgrade to ogreode from cvs, i think the version on tuans site is outdated for quite a long time and no longer supported. maybe all your problems have already been solved there, but i dont know.

juanmarcus

26-09-2007 15:57:36

no, they're not solved. it has the same bug, thank god. i'll post some screenshots soon

tuan kuranes

27-09-2007 14:09:59

bsp collision code never got finished.

If you finished and made it work please send me a patch and I'll add it to CVS version.

juanmarcus

08-10-2007 21:59:58

That's suposed to be OgreOde exemple car running on sinbad's exemple bsp with my collision system.

XDDDDD


tuan kuranes

19-10-2007 15:49:42

Nice results indeed !
How about a patch ?