About Store Forum Documentation Contact



Post Reply 
Animation parameters
Author Message
Kiekos Offline
Member

Post: #1
Animation parameters
Hey! This is a question from my friend who is involved in the project with me and is responsible for the animation.

In the editor when placing an object on the world you can edit its parameters including animation. So for example there's that string parameter "anim walk" (if I'm correct) and it has "walk.anim" file set to it. Now when in code I call .actionMoveTo(pos) the animation is executed while the character is moving.

The question is: when I create a new parameter like "skill 1" and set an animation to it ("skill_1.anim"), how do I call it in code?
12-07-2013 10:55 PM
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #2
RE: Animation parameters
You need to use Motions to play custom animations. This thread helped me out when I was looking into how to do this...
http://www.esenthel.com/community/showth...p?tid=5246
12-08-2013 04:50 PM
Find all posts by this user Quote this message in a reply
Kiekos Offline
Member

Post: #3
RE: Animation parameters
Alrighty then, I'll try that surely.

But there's one more thing that bothers me. How do I properly "align" animation speed with character movement speed and how to control the speed value?

Let's say I want my character to run faster when he equips some item. I'd have to make him go faster but also increase the animation speed so that his feet don't "float" in the air (if you know what I mean).
12-22-2013 11:24 PM
Find all posts by this user Quote this message in a reply
Kiekos Offline
Member

Post: #4
RE: Animation parameters
No one's got any ideas on that character movement and walking animation speed?
12-29-2013 10:50 PM
Find all posts by this user Quote this message in a reply
1991mirec Offline
Member

Post: #5
RE: Animation parameters
you don t increase the animation speed.. you creat a new animtion for running where his moving with his legs will be faster.. at least thats how we have it..
12-29-2013 11:43 PM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #6
RE: Animation parameters
In defualt character class you have:
Quote:speed = 8.0f;
If you have some extra animation you can scale time to get better result:
Quote:cskel.animate(sac_Jump, ctrl.timeInAir()*0.9, LerpCube(0,1,jump),true);
12-30-2013 12:10 AM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #7
RE: Animation parameters
I'm not using the default character class or the standard animation set but a variant of my own but essentially I calculate the anim time as a factor of the NPC's speed as follows:

Code:
    // Calculate the animation speed based on the speed.
    animTime += Time.d()*(m_fSpeed/m_fMaxSpeed);

    // Call the animator update to take care of the npc animation
    m_pAnimator->update(animTime);
12-30-2013 12:39 AM
Find all posts by this user Quote this message in a reply
Kiekos Offline
Member

Post: #8
RE: Animation parameters
Quote:you don't increase the animation speed.. you creat a new animtion for running where his moving with his legs will be faster..

That's surely not what I want to do considering that I will have various items changing the speed and there will be dozens of combinations...

@Pixel Perfect, that seems like the solution. Well, it was predictable - changing the duration of animation cycle will change its speed, right? smile
12-30-2013 07:03 PM
Find all posts by this user Quote this message in a reply
Post Reply