|
|
|
@ -210,12 +210,13 @@ namespace Physic
|
|
|
|
|
delete mShapeLoader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name)
|
|
|
|
|
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name,float scale)
|
|
|
|
|
{
|
|
|
|
|
//get the shape from the .nif
|
|
|
|
|
mShapeLoader->load(mesh,"General");
|
|
|
|
|
BulletShapeManager::getSingletonPtr()->load(mesh,"General");
|
|
|
|
|
BulletShapePtr shape = BulletShapeManager::getSingleton().getByName(mesh,"General");
|
|
|
|
|
shape->Shape->setLocalScaling(btVector3(scale,scale,scale));
|
|
|
|
|
|
|
|
|
|
//create the motionState
|
|
|
|
|
CMotionState* newMotionState = new CMotionState(this,name);
|
|
|
|
|