Collision

Zero23

15-11-2008 00:26:58

Hi,
I have some Question about CollisionCollide. I dont get this function to work. It always return 0. I dont know why. May can someone help me?
Here is my code, its only a test implementation.
Ogre::Vector3 ret[100], normal[100];
float pene[100];

int contacts = OgreNewt::CollisionTools::CollisionCollide(pWorld, 100, bodDotScen->getCollision(), bodDotScen->getOgreNode()->_getDerivedOrientation(), Ogre::Vector3(30, 0 , 0), bodDotScen1->getCollision(),
bodDotScen1->getOgreNode()->_getDerivedOrientation(), Ogre::Vector3(30, -50 , 0), ret, normal, pene);


The returned Contactpoints, they are they in local space? But of which Body or at both of them?

Zero23

ProfesorX

15-11-2008 21:11:10

I'm not sure, but why you pass colPosA and colPosB as a constant Value?. I think it should be the position of the objects/nodes.

And the contact point is for both bodies, that's why it is called contact point ;)

Zero23

15-11-2008 21:47:01

I pass this as an constant Value, because I only use this to test the function and in my test the position dont change! Are this contact point in global space or in space of the two bodys? Because I want to use this position to find at with position of ColA this Contact is. So I can find out if the contact is on the top or on the bottom of the body. I hope you can understand what I want to tell :D :D