Although most people animate a 3d model by “playing” an animation, we would like to manipulate each limb programmatically.
For example, if we wanted to rotate the knee joint, programmatically, we would like to be able to access the appropriate bone and set an angle to rotate it, and have all child bones (such as the foot and toes), also having their orientation changed programmatically.
Likewise, if we moved the upper leg, the lower leg should also move appropriately.
Every frame, we want to be able to set the orientation of several bones:
Head
Neck,
Spine (3 bones)
Upper Legs
Lower Legs
Feet
Upper Arms
Lower Arms
Wrists
Fingers.
Is there a way to do this programmatically rather than playing animations ? Can someone provide us with any example code ? We are looking to manipulate a 3d model of a skeleton, and basically move all bones in the skeleton programmatically.
Yes, I looked at the examples, but there doesn’t seem to be one where you can specifically manipulate any limb or body parts orientation programmatically. If I’m not wrong, they all use animations.
Thanks very much! This seems like something that should be really easy to do, but haven’t found any example anywhere. Would really appreciate your help.
It is good idea to have this opportunity. But if to see further it would be greate to have also the following linked things:
Scale individual bones. This allow to implement simple customisation of NPC.
To implement also inverse kinematic. For example you change the child bone position and its parent bone position is changed also. There should be provided some restricitions for bones to forbid them to accept some not appropriate angles (not natural angles for the body).
This is just thinking out loud. The second point is really complicated to have it good viewing. But the first should be more possible.