playMaker

Author Topic: Basic animator question - setting x/y floats dynamically (2d)  (Read 1582 times)

chrislow19

  • Playmaker Newbie
  • *
  • Posts: 5
Basic animator question - setting x/y floats dynamically (2d)
« on: February 26, 2020, 09:30:48 AM »
Hi guys, new to Playmaker but I've been playing with it a lot over the past 24 hours and finding it to be pretty awesome!

Here's my question - I'm running a top down 2d game, I'm trying out having an NPC of mine, a dog character, follow my player around a bit. I'm using the "MoveTowards" state, and I'm controlling the dog's animations using blend tree and x/y floats to change the animation direction. I'm looking for a way to dynamically set the animator floats while the dog is moving. For example, I move my player up and as the dog is following, it needs to automatically set it's y float to 1 (or closer to 1 than 0)in order to play the up walking animation.

Does anyone out there have any wisdom? Is there a better way to achieve this?

Thanks for hearing me out!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Basic animator question - setting x/y floats dynamically (2d)
« Reply #1 on: February 28, 2020, 01:13:00 AM »
Hi and welcome !


 Use the action SetAnimatorFloat to control Animator float parameters.

or are you already using this and it doesn't work?

Bye,

 Jean