zhucde
31-08-2009 09:58:45
Create a entity to Ogre scene:
then add it to PhysxWorld,
in old version , i do like this ?
but in Version1.54, how to do ?
is there any way to create a shape from a ogre meshfile? must .nxs ?
pEnt=m_SceneManager->createEntity("knot","knot.mesh");
m_SceneManager->getRootSceneNode()->createChildSceneNode()->attachObject(pEnt);
then add it to PhysxWorld,
in old version , i do like this ?
ShapeParams shapeParam;
shapeParam.setToDefault();
ShapeBlueprint * blueprint;
ConvexShape * convexshape = new ConvexShape("knot.mesh", shapeParam);
convexshape->mShapeDescription.group = GROUP_COLLIDABLE_PUSHABLE;
blueprint = static_cast<ShapeBlueprint *>(convexshape);
Vector3 scale = pEnt->getParentSceneNode()->_getDerivedScale();
blueprint->mParams.mMeshScale = NxVec3(scale.x, scale.y, scale.z);
NxOgre::Pose pose = NxOgre::Pose(entity->getParentSceneNode()->getPosition(), pEnt->getParentSceneNode()->getOrientation());
ActorParams actorParams;
actorParams.mNodeName = pEnt->getParentSceneNode()->getName();
new Actor(meshName, scene, blueprint, pose, actorParams);
but in Version1.54, how to do ?
is there any way to create a shape from a ogre meshfile? must .nxs ?