fixed the bug were the first object created was translated back to the

origin
This commit is contained in:
nicola.candussi
2008-09-24 12:40:15 +00:00
parent 752eb583d0
commit e0d1c1d057
4 changed files with 16 additions and 8 deletions

View File

@@ -404,6 +404,9 @@ proc dynamicaUI_createRigidBody(int $active, int $collisionShapeType)
connectAttr ($selection[$i * 2] + ".message") ($collisionShapeNode + ".inShape");
hide $shapeTransforms[0];
}
setAttr ($rigidBodyNode + ".active" ) $active;
setAttr ($collisionShapeNode + ".type" ) $collisionShapeType;
float $pos[]= `getAttr ($shapeTransforms[0] + ".translate")`;
float $rot[]= `getAttr ($shapeTransforms[0] + ".rotate")`;
@@ -412,9 +415,6 @@ proc dynamicaUI_createRigidBody(int $active, int $collisionShapeType)
setAttr ($rigidBodyTransforms[0] + ".rotate") -type double3 $rot[0] $rot[1] $rot[2];
// setAttr ($rigidBodyNode + ".initialRotation") -type double3 $rot[0] $rot[1] $rot[2];
setAttr ($rigidBodyNode + ".active" ) $active;
setAttr ($collisionShapeNode + ".type" ) $collisionShapeType;
$newBodies[$i] = $rigidBodyTransforms[0];
}
@@ -426,7 +426,6 @@ proc dynamicaUI_createRigidBody(int $active, int $collisionShapeType)
setAttr ($rigidBodyNode + ".active" ) $active;
setAttr ($collisionShapeNode + ".type" ) $collisionShapeType;
$newBodies[0] = $rigidBodyTransforms[0];
}