Position of Nodes. Help needed
by Albert Steckenborn · in Torque Game Engine · 09/07/2006 (4:46 pm) · 4 replies
Hi,
i've created a model file with two boxes in it. Exery Box has a Collision box too. The boxes are connected in the tree in this way:
Start01
->pxNodeBox01
|---> Box01
|---> Col01
->pxNodeBox02
|---> Box02
|---> Col02
->pxNodeJoint01
in the Preload method im searching for the nodes to get the following informations out of the models.
1) position of each box
2) size of each box
But how to do that ?
i've created some code to read the position. But is it the local position (in the file) or the world position in game ?
How do i get the size of each box and how can i change the position of each box ?
Thanks for helping !
i've created a model file with two boxes in it. Exery Box has a Collision box too. The boxes are connected in the tree in this way:
Start01
->pxNodeBox01
|---> Box01
|---> Col01
->pxNodeBox02
|---> Box02
|---> Col02
->pxNodeJoint01
in the Preload method im searching for the nodes to get the following informations out of the models.
1) position of each box
2) size of each box
But how to do that ?
i've created some code to read the position. But is it the local position (in the file) or the world position in game ?
How do i get the size of each box and how can i change the position of each box ?
Thanks for helping !
// get node Box1 and Position
pxNodeBox01 = shapeResource->findNode("pxNodeBox01");
AssertFatal(pxNodeBox01>=0,"PhysXJointData::preload: missing node pxNodeBox01");
shapeInstance->mNodeTransforms[pxNodeBox01].getColumn(3,&pxNodeBoxPos01);
// get node Box2 and Position
pxNodeBox02 = shapeResource->findNode("pxNodeBox02");
AssertFatal(pxNodeBox02>=0,"PhysXJointData::preload: missing node pxNodeBox02");
shapeInstance->mNodeTransforms[pxNodeBox02].getColumn(3,&pxNodeBoxPos02);
// get node Joint and Position
pxNodeJoint01 = shapeResource->findNode("pxNodeJoint01");
AssertFatal(pxNodeJoint01>=0,"PhysXJointData::preload: missing node pxNodeJoint01");
shapeInstance->mNodeTransforms[pxNodeJoint01].getColumn(3,&pxNodeJointPos01);About the author
#2
09/10/2006 (11:01 am)
No one ?
#3
If yes then this resource is good:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5345
I have not gotten into doing full fledged node animation. I am leading up to that, but I have not gotten there. I do know that this turret code does work. It may be able to help flesh out your code.
09/10/2006 (12:50 pm)
Are you trying to animate the nodes?If yes then this resource is good:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5345
I have not gotten into doing full fledged node animation. I am leading up to that, but I have not gotten there. I do know that this turret code does work. It may be able to help flesh out your code.
Torque Owner Albert Steckenborn
Default Studio Name
with these code i can change the position of the complete model (two boxes)
but i only want to animate one of both boxes.
i've tested it with these code
bus the box do not move.
Can anybody help me out ?