Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
How to transit between 2 animations
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to transit between 2 animations (Read 4589 times)
wijesijp
2D Toolkit
Newbie
Posts: 10
How to transit between 2 animations
«
on:
May 09, 2013, 10:09:42 am »
I have idle animation and walking animation. Idle animation wrap mode is set to single and walking animation set to loop.
When the player stops moving I want to continue the walking animation till the end then go to idle animation.
How to do this from code?
Logged
Tylernocks
Newbie
Posts: 15
Re: How to transit between 2 animations
«
Reply #1 on:
May 09, 2013, 10:21:20 pm »
try something like this
Code:
[Select]
if (!anim.IsPlaying("ANIMATION NAME"))
{
anim.Play("ANIMATION NAME");
}
Logged
wijesijp
2D Toolkit
Newbie
Posts: 10
Re: How to transit between 2 animations
«
Reply #2 on:
May 10, 2013, 04:37:17 am »
since my walking animation is looping animation will it stop playing?
Logged
Tylernocks
Newbie
Posts: 15
Re: How to transit between 2 animations
«
Reply #3 on:
May 10, 2013, 06:41:36 am »
Yeah, It works like the .fbx animation, as long as the play animation condition is in active(for example: if you press right on your keyboard), it will play.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
How to transit between 2 animations