playMaker

Author Topic: Playmaker + Mecanim - 8 Way movement (Video)  (Read 2509 times)

S0ULART

  • Playmaker Newbie
  • *
  • Posts: 27
Playmaker + Mecanim - 8 Way movement (Video)
« on: November 06, 2014, 10:23:53 AM »
Hello :)

I'm currently working on my own game in unity with mecanim and playmaker and somehow I can't get my character to move properly.
My animations alls work out well and are played but I can't walk upright. just horizontal or vertical straight.

my FSM looks like this:
https://www.dropbox.com/s/2trbo913elk9qp6/Sequence%2001.flv?dl=0

the problem is
1 the uprights movements dont work and I cant move in any direction
2 the roll behaviour is wrong it dont behaves to the actual axis of the player but to my or lets say "world" diections so when the player runs left and I press up the roll dont goes to his left side but to my left side.

hope someone can help me.
sincerely
Soul

cmonroy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Playmaker + Mecanim - 8 Way movement (Video)
« Reply #1 on: November 06, 2014, 10:04:57 PM »
Assuming you have two inputs (direction and speed) mapped to their corresponding keys, you could simplify your Animator FSM by using a 2D Freeform Cartesian Blend Tree: left goes to direction -1 and rear goes to speed -1 (or whatever you choose to call your inputs).

My guess is your input is not producing the desired values. An 8-way movement matrix (plus Idle) should be like this one:

[-1,1][0,1][1,1]
[-1,0][0,0][1,0]
[-1,-1][0,-1][1,-1]

S0ULART

  • Playmaker Newbie
  • *
  • Posts: 27
Re: Playmaker + Mecanim - 8 Way movement (Video)
« Reply #2 on: November 09, 2014, 07:28:57 PM »
thanks it works now!
but I cant get the second point right