Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Playnoob on March 10, 2014, 03:20:38 PM

Title: [Solved] Basic Anim Q: Make object really "walk" & not simply execute walk anim?
Post by: Playnoob on March 10, 2014, 03:20:38 PM
I tried to sum up the question in the title of the thread. I am a complete noob to Unity and Playmaker, yet managed quite a bit so far from the 1 week of getting to know both systems.

Here's the latest stumbling block:

I have an animal (dinosaur) with a walk cycle - I want to be able to tap a GUI button on the screen and see it do a simple walk cycle (it already has a walk anim)
but actually move some distance. Right now, it simply walks in-place.

Is there an easy way to do this?

I have the Dino with a mesh collider and rigid body, with IsKinematic turned off in the inspector.

Things I've tried:
Adding force to the Dino object - great. It works but after the walk anim executes a cycle, the dino is still skidding along. So I don't quite know how to "reset" the force to zero

I don't even know if this is the proper way to do this, so if there is an easy way, I'd love some help.
Title: Re: Basic Anim Q: Make object actually "walk" and not simply execute a walk anim?
Post by: jeanfabre on March 11, 2014, 06:25:44 AM
Hi,

 Is your animation really an "in place anim" or does it has movement? If not, you need to move it precisly and for this I would recommand using mecanim. Are you using mecanim here? or simply triggering the animation itself manually?

bye,

 Jean
Title: Re: Basic Anim Q: Make object actually "walk" and not simply execute a walk anim?
Post by: Playnoob on March 12, 2014, 01:12:59 AM
Hi Jean,
 The Dinos are from this pack on the unity store.
http://u3d.as/content/janpec/dinosaur-pack-1-0/3kN

They are animated (walk cycle, run cycle etc)... and I can trigger them to play with Playmaker. Where I'm stuck is, I dont know a node graph that makes them also move (i.e walk forward) while the walk cycle anim is playing.

I'm triggering the animation manually via playmaker.
I havent explored Mecanim yet - Still learning Unity and Playmaker.

Kind Regards.

Title: Re: Basic Anim Q: Make object actually "walk" and not simply execute a walk anim?
Post by: jeanfabre on March 12, 2014, 08:39:30 AM
Hi,

 I would make the extra effor to work with Mecanim, you will totally love it and it will make your life  a lot easier on that front.

Else, you need move your gameobject manually, that's all there is to it basically. so use the action "translate", you will have to know the exact foot stride for the foot animation to feel right.

Bye,

 Jean
Title: Re: Basic Anim Q: Make object actually "walk" and not simply execute a walk anim?
Post by: Playnoob on March 12, 2014, 08:53:24 AM
Thanks Jeanfabre.
 I'll subscribe to the Lynda.com tutorials on Mecanim. I had tried the translate option in Playmaker, but didnt know how to "disguise" the translate so that the translate occurs "while" the walkcycle animation is playing.

What happens for me is that either the translate event happens first then the walkcycle anim plays or the walkcycle plays and then the translate happens, resulting in a "jerky" motion.
Is there a way / method to make both the translate and the walk cycle anim play at the same time?
I ask this only for my learning (might come in handy for other non humaniod/mecanim animations).

Regards.
Title: Re: Basic Anim Q: Make object actually "walk" and not simply execute a walk anim?
Post by: jeanfabre on March 14, 2014, 07:15:17 AM
Hi,

 that's really about fine tuning here. I would suggest you acquire as much knowledge of Mecanim first so that solving this translation/Animaion becomes less filled up with uncertainties. You should be able to fire an mecanim animation AND translate at the same time exactly, no question about it.

bye,

 Jean
Title: Re: [Solved] Basic Anim Q: Make object really "walk" & not simply execute walk anim?
Post by: Playnoob on March 14, 2014, 07:33:10 AM
Thanks Jeanfabre.
 I'm marking this solved.

Attached image is the graph I did to get it going.
Mainly it was applying force to move_vector.

Kind Regards.
Title: Re: [Solved] Basic Anim Q: Make object really "walk" & not simply execute walk anim?
Post by: jeanfabre on March 14, 2014, 07:47:24 AM
Excellent!

bye,

 Jean