Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: teenden001@gmail.com on February 18, 2019, 03:49:48 AM

Title: simple animation
Post by: teenden001@gmail.com on February 18, 2019, 03:49:48 AM
i have one stick(Capsule) and i have created two animations on it.

1. stick revolving clockwise      - animation clipname: cwise
2. stick revolving anticlockwise  - animation clipname: awise

please let me know how to assign this two different animation
on two buttons, if i press button1 it would start cwise animation
and button2 would start with awise animation.

please help

Title: Re: simple animation
Post by: djaydino on February 18, 2019, 09:44:39 PM
Hi.
If you mean on screen ui buttons then you can use "Ui Button On Click Event"
if controller buttons then you can use "Get Button Down"

Have a state with 2 buttons (one for each rotation)

Then have a state for left rotation and a state for right rotation.

In these states you can use "play animation" and set animation name for each one.

If you use animator, you could use "Set Animator Trigger" or "Set Animator Bool" to set or trigger the animator parameters.