newbie question

som

08-10-2008 15:30:23

Hi guys!

I am very new to physics world and Newton is my first physics library.

let me explain my problem:

I have a scene where i have a virtual hand and a few cylindrical objects.
My job is to move the hand to the objects and pick them up one at a time and placing it at a different place.
Let me say that the hand doesnt have any animation sets of finger bending and all.

What i am using as a logic is, i am making the hand as convex hull and the cylinders as solid cylinder.
Now if collision then i will attach the node of the cylinder to the hand and move it.
this is all i have thought.
But the problem I am facing is that when i am moving the hand to the cylinders,there is no collision taking place between the hand and cylinder & the hand passes the cylinder.

To confirm you physics is applies properly.

Can any body give me soln to this.
a bit urgent.
Thanks in advance :) :) :) :)

micken

08-10-2008 19:06:43

You will need to post the relevant code if you want a solution. These are the things required for a collision to be detected:

2 Body objects,
1 MaterialPair object,
at least 1 MaterialID,
A CustomContactCallback for the MaterialPair.

To detect a collision you need to assign a MaterialID to each of your Body objects. Once this is done you need to make a MaterialPair with the MaterialIDs used. You can then hook your CustomContactCallback to the MaterialPair. Once this is done OgreNewt will call your CustomContactCallback::userBegin() whenever the AABB of your 2 objects intersect. returning true from this function means that you want OgreNewt to process the collision. returning false means that you want OgreNewt to ignore this collision.

If you returned true from userBegin OgreNewt will then call CustomContactCallback::userProcess(). It is in here that you define the code you want to happen when the 2 objects actually collide.

som

10-10-2008 07:44:23

thanks micken for the reply..
sorry for being late..

ur suggestions helped me..

what i am facing now is the movement of the hand, which is not moving properly.

i will keep posted my proceedings.

Thanks..Any further suggestions will be appreciated. :)