mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +00:00
Outputting formatted string with scale
This commit is contained in:
parent
20288de685
commit
10810ee311
1 changed files with 7 additions and 0 deletions
|
@ -324,12 +324,19 @@ namespace Physic
|
||||||
|
|
||||||
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name,float scale)
|
RigidBody* PhysicEngine::createRigidBody(std::string mesh,std::string name,float scale)
|
||||||
{
|
{
|
||||||
|
char uniqueID[4];
|
||||||
|
sprintf( uniqueID, "%1.2f", scale );
|
||||||
|
std::string sid = uniqueID;
|
||||||
|
std::string outputstring = mesh + sid + ">|";
|
||||||
|
std::cout << outputstring << "\n";
|
||||||
|
|
||||||
//get the shape from the .nif
|
//get the shape from the .nif
|
||||||
mShapeLoader->load(mesh,"General");
|
mShapeLoader->load(mesh,"General");
|
||||||
BulletShapeManager::getSingletonPtr()->load(mesh,"General");
|
BulletShapeManager::getSingletonPtr()->load(mesh,"General");
|
||||||
BulletShapePtr shape = BulletShapeManager::getSingleton().getByName(mesh,"General");
|
BulletShapePtr shape = BulletShapeManager::getSingleton().getByName(mesh,"General");
|
||||||
shape->Shape->setLocalScaling(btVector3(scale,scale,scale));
|
shape->Shape->setLocalScaling(btVector3(scale,scale,scale));
|
||||||
|
|
||||||
|
|
||||||
//create the motionState
|
//create the motionState
|
||||||
CMotionState* newMotionState = new CMotionState(this,name);
|
CMotionState* newMotionState = new CMotionState(this,name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue