Way to blend between an ent_animate call and ent_bonerotate?

Posted By: silencer

Way to blend between an ent_animate call and ent_bonerotate? - 04/03/09 16:27

I know how to blend between two animations using the ent_animate function, and then ent_blend.

However, I am calling a walk animation using "ent_animate", but I want to rotate a "neck" bone making use of the ent_bonerotate function.

So far I haven't found a way to blend an animation with a specific bone rotate call so that my character can walk and rotate its neck bone at the same time.
Posted By: the_clown

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/03/09 17:05

Well, it should work if you define an angle, then call
ent_bonerotate for the "neck" bone when you want it to rotate:

VECTOR neck_angle;

.....

ent_bonerotate(my,"neck",neck_angle); //rotate it
neck_angle.x += 20*time_step; // rotate pan
neck_angle.y += 5*time_step; // rotate tilt

......

Play with the values in the lines where the vector gets modified; call the whole thing in a loop
Should work;
Posted By: EvilSOB

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/03/09 17:17

the_clowns code looks OK, just remember to use it AFTER any ent_animate,
and before any wait's.
Posted By: Quad

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/03/09 17:37

or you can use ANM_ADD mode of ent_animate,

reset all bones every frame(ent_bonereset_all???), make your changes(ent_bonerotate) and add angles from your animation frame using ent_aniamte(...,...,...,ANM_ADD)


afaik this is covered in lite-c workshops.
Posted By: Jaxas

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/03/09 17:40

and what about "ent_bonereset(my,"neck")"? i think you need to put this line before "ent_bonerotate(my,"neck",neck_angle)" smile
Posted By: Quad

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/03/09 17:41

when you reset allbones it gets reset too.
Posted By: silencer

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/04/09 00:27

ent_animate only takes a scene.

How can you define a scene with a bonereset?
Posted By: Jaxas

Re: Way to blend between an ent_animate call and ent_bonerotate? - 04/04/09 10:01

you don't need to reset whole scene, you just need to rotate that bone, no?
© 2024 lite-C Forums