Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Bqlqzs on September 02, 2013, 05:34:06 AM

Title: Play animation if object move [Solved]
Post by: Bqlqzs on September 02, 2013, 05:34:06 AM
Hello

Can I play animation if the object move?

I want animate my character, but the same way, i need lot of difference,
because ok I set if W key down play forward animation...

But if W key down and more A key down play forward with strafe.. and ect..
It is long and difficult..

So can I play animation if the gameobject is move ? not for keys

Anybody know the simpliest way?
Title: Re: Play animation if object move
Post by: ranfunk on September 02, 2013, 02:39:30 PM
https://hutonggames.fogbugz.com/default.asp?W181
don't know is this the right thing
Title: Re: Play animation if object move
Post by: Bqlqzs on September 03, 2013, 10:29:34 AM
Thx but not this...

I want play animation, when the gameobject is moving .
Title: Re: Play animation if object move
Post by: Lane on September 03, 2013, 11:17:36 AM
I may not fully understand what you're asking but it is going to be complex regardless, I believe.

It could be simpler if you used Get Axis and setup WASD, then for your animation triggering also use Get Axis. Or, using Get Axis enter/exit states where animations are played based on the axis value.
Title: Re: Play animation if object move
Post by: Splankton on September 03, 2013, 11:39:57 AM
Thx but not this...

I want play animation, when the gameobject is moving .

I'm after something similar, except I just want to add a count value inside a trigger when the player object moves.  A good way to do it in scripting, is to check the rigidbody for movement, but I cant find it in the action browser.  So there must be another way.
Title: Re: Play animation if object move
Post by: Bqlqzs on September 03, 2013, 02:38:14 PM
Thx but not this...

I want play animation, when the gameobject is moving .

I'm after something similar, except I just want to add a count value inside a trigger when the player object moves.  A good way to do it in scripting, is to check the rigidbody for movement, but I cant find it in the action browser.  So there must be another way.


Ok thank you
Title: Re: Play animation if object move [Solved]
Post by: jeanfabre on September 11, 2013, 03:45:04 AM
Hi,

 you can check fro rigidbody movement by checking its speed. You can use the action "Get Velocity" and have an float compare to check if it's below a certain threshold.

EDIT: actually, use the action "isSleeping", it's a lot better and a built in feature of Unity.

http://docs.unity3d.com/Documentation/Components/RigidbodySleeping.html

bye,

 Jean
Title: Re: Play animation if object move [Solved]
Post by: Bqlqzs on September 11, 2013, 11:14:00 AM
Hi,

 you can check fro rigidbody movement by checking its speed. You can use the action "Get Velocity" and have an float compare to check if it's below a certain threshold.

EDIT: actually, use the action "isSleeping", it's a lot better and a built in feature of Unity.

http://docs.unity3d.com/Documentation/Components/RigidbodySleeping.html

bye,

 Jean

Yes it is better thank you