Truelegend
Member
|
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 |
|
Driklyn
Member
|
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 |
|