About Store Forum Documentation Contact



Post Reply 
Animation - help!
Author Message
Truelegend Offline
Member

Post: #1
Animation - help!
Hello i want to change character animation when is mouse button pressed so i tried:

In Update function
Code:
/******************/
if(Ms.b(1))
{
     Players[0].cskel.clear();
     Players[0].cskel.animate(L"anim/ride.anim",Time.time());
     Players[0].cskel.updateMatrix(MatrixIdentity);
     Players[0].cskel.updateVelocities();
}
/******************/

But when i click mouse button then player disappear :(
When i put out my finger from button then player appear.

What is wrong with my code ?

Pleae help.
(This post was last modified: 04-12-2011 07:42 PM by Truelegend.)
04-12-2011 07:41 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: Animation - help!
You should probably place that directly inside of your player class in the Player::animate() method.

And probably set a boolean variable to true/false when Ms.b(1) is true/false, then check if that variable is true inside of the animate() function before using custom animation.

Also, check out this tutorial if you haven't: "EsenthelEngineSDK\Tutorials\Source\Advanced\4 - Demos, Game Basics\Game Basics\12 - Character Animations.cpp"
04-13-2011 07:41 AM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #3
RE: Animation - help!
okey i will check this tutorial smile
04-13-2011 07:59 AM
Find all posts by this user Quote this message in a reply
Post Reply