Quantcast

Jump to content

» «
Photo

[Q]Blend two animations

4 replies to this topic
Nevitro
  • Nevitro

    Modder

  • Members
  • Joined: 31 Mar 2009

#1

Posted 11 May 2013 - 09:17 AM

Hi. I just want test something and i do not have idea...
Someone allready made blend between two animations?

Also, Niko just stand up after all animations [bones go to default position]. Soo, mayby someone know how to change it and set "default" position to animations bone?
There are native calls:
CODE

extern void BLEND_OUT_CHAR_MOVE_ANIMS(Ped ped);
extern void BLEND_FROM_NM_WITH_ANIM(Ped ped, char *AnimName0, char *AnimName1, int, float x, float y, float z);
extern boolean CHECK_NM_FEEDBACK(Ped ped, int id, boolean);
extern void GET_CHAR_ANIM_BLEND_AMOUNT(Ped ped, char *AnimName0, char *AnimName1, float *amount);
extern void SET_CHAR_ANIM_BLEND_OUT_DELTA(Ped ped, char *AnimName0, char *AnimName1, float delta);

Exactly:
extern void SET_CHAR_ANIM_BLEND_OUT_DELTA(Ped ped, char *AnimName0, char *AnimName1, float delta);
What is delta? Before this should be:
extern void REQUEST_ANIMS(char *animName);?

Please... someone know?

julionib
  • julionib

    Coder

  • Feroci
  • Joined: 13 Sep 2012
  • Brazil

#2

Posted 12 May 2013 - 02:40 PM

well, i dont know if is this what you want, but you can use the default play animation method and use this native:

Native.Function.Call("TASK_PLAY_ANIM_SECONDARY_UPPER_BODY", player.character, animName, animSet, 8.0, 0, 0, 0, 0, 0)

8.0 is speed, the others i have no idea ^^

this way you can play an anim with upper body and keep walking for example

Nevitro
  • Nevitro

    Modder

  • Members
  • Joined: 31 Mar 2009

#3

Posted 12 May 2013 - 04:43 PM

I mean a nice slowly change animations. I know game just set bone from last position to next animation first frame position... But it is very fast. How to change it? How to change how fast niko change his bones position between animations?
And Your code i trying, not works always... I prefer AnimationFlags smile.gif

julionib
  • julionib

    Coder

  • Feroci
  • Joined: 13 Sep 2012
  • Brazil

#4

Posted 13 May 2013 - 05:15 AM

yep, it fail sometimes because its task i guess, and in bike some animations dont look right

Nevitro
  • Nevitro

    Modder

  • Members
  • Joined: 31 Mar 2009

#5

Posted 13 May 2013 - 11:55 AM

Okey, but dear Julio, what is this "Delta"?
And how to make smoothly blend between two animations? Can do this?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users