Problems with tree collisions & NewtonCollisionPointDist

Kencho

11-04-2006 22:06:15

Hey all!

Does someone know if tree collisions are supported with the function NewtonCollisionPointDistance() ? The Newton manuals state that they are supported, and indeed, the Newton SDK demos show it's possible to do, but for some reason it doesn't work with OgreNewt::Collision::getNewtonCollision(). All the other OgreNewt collisions work fine (Box, Capsule...).

I really need to know what might be happening as it's a key feature of my project...
Thanks in advance!

[EDIT] Re-checking the source code of the demo, I've seen they use a convex hull, which unfortunately doesn't work for me. I guess I'll have to search for a way to do compound collisions to simulate the tree collision... :roll:

walaber

12-04-2006 01:56:32

yeah, it only works on convex parts or compounds thereof.

might be worth requesting that the closestpoint function support TreeCollisions on the Newton forums... it might get added!

Kencho

12-04-2006 08:36:44

They mention it in the manual (though they seem to have forgotten to add a "not" there), so I guess they're already on it. Meanwhile, I'll be working this morning in a method to create a compound of convex hulls from a subentity with many convex subentities.hope this works for now...
Thanks for your help dude :)

Kencho

12-04-2006 11:55:24

Update:

After a lot of fighting with pointers and retrieving the submesh vertices from an entity, I managed to get the (highly buggy and un-optimized) functions to work. Now I can create a compound collision out of a series of convex hulls defined as submeshes :D