Playing animation

#1
Hello,

I want to learn how can i play and stop animation. Second, i want to play animation specifically. Such as, there is a jumping animation. When i press "j" it jumps when i press "k" it jumps but want to stop it in the middle of the animation (for this example, the top)

Thanks
RainMan14

Re: Playing animation

#2
This project shows how to play animations:
https://www.cryengine.com/marketplace/p ... ame-sample
But this isn't the standard way to play animations on characters. Animations are
abstracted with mannequin. Learn more about it here:
http://docs.cryengine.com/display/SDKDOC2/Mannequin
It requires more setup, but gives you more flexibility.
Most cryengine templates are using mannequin and are good examples for basic usage.
For inputs read about "Action maps" here:
http://docs.cryengine.com/display/SDKDO ... Game+Input
The templates also use action maps.

Re: Playing animation

#3
So if you just want to start and stop animations you could use this code:

Code: Select all

CryCharAnimationParams animParams;
animParams.m_fPlaybackSpeed = animationSpeed; // your animation speed
animParams.m_nFlags = CA_LOOP_ANIMATION; // flags to specify the animation

// pCharacter should be your ICharacter
pCharacter->GetISkeletonAnim()->StartAnimation(m_animation, animParams);


Everything more complex can be seen in the C++ ThirdPersonTemplate or in the GameSDK.

Good Luck

Who is online

Users browsing this forum: crysky1 and 1 guest