caifie
17-05-2010 08:49:18
hi!
i get the *.nxs file from ogre *.mesh by ogrexmltoflower and flour 0.4,(like robot.mesh to robot.nxs).
when i using --cupcake in flour 0.4 to view the robot.nxs, i found it was very big and auto move slowly(LinearVelocity change slowly).
and there will be some problem when using robot.nxs in nxogre app, with below code,(create convex body)
the robot will fall down the floor and then fly into the sky(looks like by some unknown force or something other)
but when i using the other code, the robot will stand in the floor well.(create box body)
so what wrong with this. seems i can not using ConvexDescription to create convex body?
ps: i get the robot.nxs by using convex syntax in rb script and flour.
anybody know this?
if can't create the convex body like this, how can i create a body suit with the mesh entity exactly?
thans in advance!
i get the *.nxs file from ogre *.mesh by ogrexmltoflower and flour 0.4,(like robot.mesh to robot.nxs).
when i using --cupcake in flour 0.4 to view the robot.nxs, i found it was very big and auto move slowly(LinearVelocity change slowly).
and there will be some problem when using robot.nxs in nxogre app, with below code,(create convex body)
NxOgre::Mesh* robot = meshMan->load("ogre://Popular/robot.nxs", "robot");
Critter::BodyDescription bodyDescriptionb;
bodyDescriptionb.reset();
bodyDescriptionb.mMass = 40.0f;
bodyDescriptionb.mLinearVelocity .zero();
Critter::Body* bodyb=mRenderSystem->createBody(NxOgre::ConvexDescription(robot), Vec3(2,13,7), "robot.mesh", bodyDescriptionb);
bodyb->getSceneNode()->setScale(0.1,0.1,0.1);
the robot will fall down the floor and then fly into the sky(looks like by some unknown force or something other)
but when i using the other code, the robot will stand in the floor well.(create box body)
Critter::BodyDescription bodyDescription;
bodyDescription.mMass = 40.0f;
bodyDescription.mLinearVelocity=Vec3(1,0,0);
body = mRenderSystem->createBody(NxOgre::BoxDescription(3,4,3), Vec3(8,11,9), "robot.mesh", bodyDescription);
body->getSceneNode()->setScale(0.1,0.1,0.1);
so what wrong with this. seems i can not using ConvexDescription to create convex body?
ps: i get the robot.nxs by using convex syntax in rb script and flour.
anybody know this?
if can't create the convex body like this, how can i create a body suit with the mesh entity exactly?
thans in advance!