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.
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
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.
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
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.