Sign in to follow this  

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

Recommended Posts

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this