Collision detection failed for an OctTreeTriangleSelector

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
dude3d
Posts: 25
Joined: Thu Sep 06, 2007 3:45 am

Collision detection failed for an OctTreeTriangleSelector

Post by dude3d »

I was trying to create a customized OctTreeSceneNode by using a mesh with one mesh buffer which has only four vertices. An OctTreeTriangleSelector was created by the mesh. A CollisionResponseAnimator was added to the OctTreeTriangleSelector. And a customized RPG camera was used to run against the OctTreeSceneNode. I found that the collision detection failed if the ellipsoidRadius of the CollisionResponseAnimator was small.

For the four vertices, their coordinates are as the following:

Code: Select all

A(-500, -100,  200),
B( 500,  700,  200),
C( 500, -100,  200),
D(-500,  700,  200)
If I set the ellipsoidRadius smaller than irr::core::vector3df(90,90,90), the collision detection would fail.

When I did the test, I kept all other factors unchanged while tesing different ellipsoidRadius values. So the problem should be correctly isolated to the value of the ellipsoidRadius.

To my understanding, the value of the ellipsoidRadius should only affect how close the RPG camera can go near the customized OctTree scene node. It should not interfere with the result of collision detection.

I checked the engine's source code and I did not get any clue yet. Could anybody from the development team take a look at it?
wREAKAILDRON
Posts: 38
Joined: Tue Aug 21, 2007 6:54 pm
Contact:

Post by wREAKAILDRON »

i was playing around with heightmaps, and when i made the heightmap too big, the camera ellipsiod would fall through the land. Ive done collision myself with an old octree that gametutorials used to give out for free. I know that when you make the triangles too big, the ellisiod formula can fail on you. And with tweaking youru formuyla and sizes, you can make ti work perfectly, even if you come up with it yourself. Ive made original collision with an ellisiod and walls, and i could never get it perfect, but ive shown people, with a tiny amount of jiggle, my guy coudl slide along the walls with out going through at all. But i could never get it perfect, Id get a tiny amount of jiggling all the time. And if my guy is moving on top of land, for me it always works just to get the position of the floor under you, and position yourself on top of the land with that eisier formula, the triangle position such type formula; either your somewhere inside the triangle or on one of the three triangle edges.

Your original work sounds neat, id like to see more games that have some originality to the shape of the programming.
________
Vaporizer guide
Post Reply