Maya API : MFnIkJoint and set the position of the bone joint in space?

Started by
-1 comments, last by tanip31 14 years, 1 month ago
Hi, I wanted to create 2 bone joints.I wanted to set the position of the joint in world space. Please help. Many thanks in advance MFnIkJoint joint1Fn; MObject join_a=joint1Fn.create(MObject::kNullObj,&stat) MFnIkJoint joint2Fn; MVector vec= MVector(20.0,0.0,0.0) //MTransformationMatrix::setTranslation(vec,MSpace::Space) //::addTranslation(vec,MSpace::kWorld) joint2Fn.setTranslation(vec, MSpace::kWorld ) MObject join_b=joint2Fn.create(MObject::kNullObj,&stat) joint1Fn.addChild(join_b,1,false) joint2Fn.setTranslation(vec, MSpace::kWorld )//I am not sure where to set translation,before //creating the bone or after creating the bone?Nothing happened with this code.Both joint shows at origin(0.0,0.0,0.0)in maya interface.

This topic is closed to new replies.

Advertisement