Immoho
24-12-2007 06:16:19
Hi.
Here's the code.
I found that the pMonsterNode's center is not the same as the entity's.
Another problem is the setNode();
When I use the code above I can move the entity by moving the pMonsternode.
But when I use
I cant move the entity when the pMonsterNode is moving.
How to adjust the entity's center to the node's center?
What's the diffence between body->setNode(node) and node = body->getNode()?
Thanks.
Here's the code.
body = mScene->createBody("monster.mesh",new CubeShape(0.01f),Vector3(500,40,800),"mass:10");
pMonsterNode = body->getNode();
I found that the pMonsterNode's center is not the same as the entity's.
Another problem is the setNode();
When I use the code above I can move the entity by moving the pMonsternode.
But when I use
body->setNode(pMonsterNode);
I cant move the entity when the pMonsterNode is moving.
How to adjust the entity's center to the node's center?
What's the diffence between body->setNode(node) and node = body->getNode()?
Thanks.