playMaker

Author Topic: [Solved] Basic Anim Q: Make object really "walk" & not simply execute walk anim?  (Read 2556 times)

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
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.
« Last Edit: March 14, 2014, 07:23:26 AM by Playnoob »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
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

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
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.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
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

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
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

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Excellent!

bye,

 Jean