Jboy
03-18-2005, 09:44 PM
I'm trying to generate a character rig. I want the parent-space rotations of every bone to be set to zero. I have done this, and offset the bone geometry back to make it look purty, but now my local-space rotations match the parent space ones. Can I have the local space rotations stay as they were when the bones were created but still initialize the parent-space rotations to all zeros?
I'm using Max 5.
Here's a sample of the code:
b2 = BoneSys.createBone RankleLoc.pos RheelLoc.pos [0,-1,0]; --Create Right Ankle Bone
b2.width = 0.05;
b2.height = 0.05;
b2.parent = b1;
RankleOffsetRot = eulerAngles 0 0 0;
RankleOffsetRot.x = b2.rotation.x_rotation in coordsys parent;
RankleOffsetRot.y = b2.rotation.y_rotation in coordsys parent;
RankleOffsetRot.z = b2.rotation.z_rotation in coordsys parent; --find offset rotation values
in coordsys parent b2.rotation.x_rotation = 0; --align Ankle Rotation to parent
in coordsys parent b2.rotation.y_rotation = 0;
in coordsys parent b2.rotation.z_rotation = 0;
b2.objectOffsetRot = eulerToQuat RankleOffsetRot; --align to child using offset rotation values
Any thoughts would help... Thanks!
I'm using Max 5.
Here's a sample of the code:
b2 = BoneSys.createBone RankleLoc.pos RheelLoc.pos [0,-1,0]; --Create Right Ankle Bone
b2.width = 0.05;
b2.height = 0.05;
b2.parent = b1;
RankleOffsetRot = eulerAngles 0 0 0;
RankleOffsetRot.x = b2.rotation.x_rotation in coordsys parent;
RankleOffsetRot.y = b2.rotation.y_rotation in coordsys parent;
RankleOffsetRot.z = b2.rotation.z_rotation in coordsys parent; --find offset rotation values
in coordsys parent b2.rotation.x_rotation = 0; --align Ankle Rotation to parent
in coordsys parent b2.rotation.y_rotation = 0;
in coordsys parent b2.rotation.z_rotation = 0;
b2.objectOffsetRot = eulerToQuat RankleOffsetRot; --align to child using offset rotation values
Any thoughts would help... Thanks!
