IvanJ147
20-02-2012 14:57:27
Hi all,
I don't know if this is a right question for this forum, so if I'm wrong I apologize.
I'm using PhysX candy wrapper with mogre; in my scene there are only a table, an hand and some objects on the table. I manage hand motion with a inertial sensor.
The purpose of the scene is to take the objects and position them on a specific sector of table.
The problem is that I can't manage in correct way the object I take. I tried in 2 ways:
1- When I take it, I set its Kinematic parameter to True. Now, everytime I move the hand I use this instruction:
In this way I notice the problem that you see in this video:
http://www.youtube.com/watch?v=np5Vvj5tJSk&feature=youtu.be
Seems that the under object is subjecting of a huge force.
2- I calculate the instantaneous velocity of hand motion, and I set to taken object this velocity. In this case I haven't the problem of previous case, but another: the object doesn't follow perfectly the hand.
http://www.youtube.com/watch?v=4KvYNRxc3lQ&feature=youtu.be
Can you say me how to use correctly one of two ways? Or say me another way to manage taken objects, if these are not the best.
Thank you for your help.
I don't know if this is a right question for this forum, so if I'm wrong I apologize.
I'm using PhysX candy wrapper with mogre; in my scene there are only a table, an hand and some objects on the table. I manage hand motion with a inertial sensor.
The purpose of the scene is to take the objects and position them on a specific sector of table.
The problem is that I can't manage in correct way the object I take. I tried in 2 ways:
1- When I take it, I set its Kinematic parameter to True. Now, everytime I move the hand I use this instruction:
takenObj.MoveGlobalPosition(mSceneMgr.GetSceneNode("Hand").Position)
In this way I notice the problem that you see in this video:
http://www.youtube.com/watch?v=np5Vvj5tJSk&feature=youtu.be
Seems that the under object is subjecting of a huge force.
2- I calculate the instantaneous velocity of hand motion, and I set to taken object this velocity. In this case I haven't the problem of previous case, but another: the object doesn't follow perfectly the hand.
dim velHand a mogre.vector3
velHand.x = (posCurrX - o.mSceneMgr.GetSceneNode("hand").Position.x) / timeStep
velHand.y = (posCurrY - o.mSceneMgr.GetSceneNode("hand").Position.y) / timeStep
velHand.z = (posCurrZ - o.mSceneMgr.GetSceneNode("hand").Position.z) / timeStep
takenObj.LinearVelocity = velHand
http://www.youtube.com/watch?v=4KvYNRxc3lQ&feature=youtu.be
Can you say me how to use correctly one of two ways? Or say me another way to manage taken objects, if these are not the best.
Thank you for your help.