I am just starting to get into bones for models in MED.

I am currently using the classic Gamestudio medieval guard model with a feather on his head, to test functionality for the game, and using it as the player model.

I am sure most of you know that this model uses vertex animation, not bone animation. I manually added two bones to this model, one in the middle of the waist, and one in the middle of the shoulders. I attached the waist vertices to the waist "bone", and the upper body vertices to the shoulders "bone".

When I press the Animate button in MED, I can rotate the entire upper body of the player model by manually rotating the waist "bone", since the shoulders "bone" that is linked to the upper body vertices is connected to the waist "bone".

I am trying to figure out how to rotate the waist bone during gameplay, with the mouse. I would like to make it so that if the player moves the mouse upward, the waist "bone" rotates, causing the player model to bend forward at the waist. If the player moves the mouse downward, the waist "bone" also rotates, causing the player model to bend backward at the waist.

I found some functions relating to bone manipulation, which are ent_bonename() and ent_bonerotate().

I think I initialize the waist "bone" in the code like this:

Code:
ent_bonename(me, "waist", 194);
   // me = player, 194 = vertex attached to waist "bone"



I also assume that I would use the ent_bonerotate() function to be used when trying to make the mouse rotate the waist "bone" forward and backward. I also assume I would use the tilt and mickey functions to work with the ent_bonerotate() function to make this work.

Would it go something like:

Code:
mickey.y = ent_bonerotate(me, "waist", vector(0,my.skill2,0);



Any help in helping me me understand how the Lite-C code works with the bone functions would be greatly appreciated. Thank you.


Last edited by Ruben; 10/16/15 01:18.