playMaker

Author Topic: 2D Simple Character Controller - Flip Direction  (Read 4107 times)

dmp

  • Playmaker Newbie
  • *
  • Posts: 1
2D Simple Character Controller - Flip Direction
« on: March 27, 2014, 05:43:13 AM »
I am making a 2D platformer with the Unity 4.3 2D features. I have cobbled together a left right player movement. This works fine.

But as soon as I try to flip the character direction by scaling horizontally to -1 I get a "loop exceeded" error. Is there a better way to set the direction of the character? Or to have it go to a "left" state only when the direction has changed?

See attached pics of my current FSM.







jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2D Simple Character Controller - Flip Direction
« Reply #1 on: March 27, 2014, 06:17:24 AM »
Hi,

 you need to look left only when you know you are facing right and you need to check for look right only when you know you are looking left, so basically two state, one when looking left ( set the cahractet to look left and watch for look right action) and one state that do the opposite.

 As soon as PlayMaker 1.8 will be out, I will release the Unity 2d platform demo done in playmaker, it will feature this system.


bye,

 Jean

skilla

  • Playmaker Newbie
  • *
  • Posts: 6
Re: 2D Simple Character Controller - Flip Direction
« Reply #2 on: April 16, 2014, 03:05:01 AM »
do you have a sample for this?

any ETA on 1.8?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2D Simple Character Controller - Flip Direction
« Reply #3 on: April 17, 2014, 02:28:47 PM »
Hi,

 1.8 is going to be a long cycle as a lot of underlying changes are happening. I don't know how long tho, but definitly not for this month.

bye,

 Jean

skilla

  • Playmaker Newbie
  • *
  • Posts: 6
Re: 2D Simple Character Controller - Flip Direction
« Reply #4 on: April 18, 2014, 02:56:09 PM »
hope you can release a simple 2D controller for left, right, jump and attack. I've been trying that this past 2 weeks but not successful. I can't combine the keys and animations, something somewhere always mess up the wiring.