playMaker

Author Topic: Need help on 2D character controller[SOLVED]  (Read 10980 times)

daniviva

  • Playmaker Newbie
  • *
  • Posts: 6
Need help on 2D character controller[SOLVED]
« on: January 20, 2014, 09:13:22 PM »
Hi all,
I am an artist/animator who just start learning / experimenting with playmaker to make a 2D platformer game.
however, got stuck in making a 2d character controller. My goal is pretty simple at this stage: just wanna achieve left/right movement by hitting "D" and "A".

In the controller FSM attached to the character, basically, i used "Get Axis" and "Set velocity 2D"; This works perfectly well with the movement at the beginning, but

(HERE IS THE PROBLEM: )i found the character will sometimes stop/freeze (not moving forward) when holding down the keys; in order to make it move forward again, i need to move it backward first.... but later the character will freeze again...

I've spend hrs to try to figure it out what's wrong with the FSM with my limited understanding with playmaker and coding, but i got no clues and luck so far. One interesting thing i found when playing with the rigidbody 2d setting of the character game object is that
IF i UNCHECKED "Fixed Angle" and hit "play" again, the character would have NO problems with the movement!! It moves smoothly but, instead, the character, this time, will rotate based on the movement direction under the effect of gravity... :-\

Did anyone have this problem before?? Do i miss some crucial actions on the FSM?
If you guys've made a character controller before, would u mind sharing the rigging on FSM with me?  I really wanna solve this issue.

Thanks in advance!
« Last Edit: January 24, 2014, 06:14:37 AM by jeanfabre »

daniviva

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need help on 2D character controller
« Reply #1 on: January 21, 2014, 09:39:48 PM »
re-surfacing this issue.

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: Need help on 2D character controller
« Reply #2 on: January 22, 2014, 08:07:58 AM »
This is a collider issue, if the grounds are using separate collider each this often happens, try to use another Empty Gameobject that have 2d collider that covers the ground, and remove all the collider component from the ground objects.

Alatriste

  • Full Member
  • ***
  • Posts: 193
Re: Need help on 2D character controller
« Reply #3 on: January 22, 2014, 11:50:31 PM »
Have you checked this tutorial?
Maybe you can find a way to extrapolate the solution to your 2D control. I think there is also a tutorial covering 2D control in the Hutong tutorials playlist. (although is using a previous version of Unity and many of the steps to make the 2D game are now unnecessary)

daniviva

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need help on 2D character controller
« Reply #4 on: January 23, 2014, 02:34:08 AM »
Problem SOLVED!

@ Cloud03: THANKS SO MUCH!! You are right; I have collider2d on EACH ground sprite, instead of parenting them under an empty GO. Phew~~ i can now move on to making complex movement control. :)

@Alatriste: THANKS for ur input, too! and yes, i watched almost all those tutorials on youtube. Wish Hutong game keep making more in the near future.

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: Need help on 2D character controller
« Reply #5 on: January 23, 2014, 03:25:28 AM »
Glad to Help! :)

shameless plug: Please check out my youtube page, I've also uploaded Playmaker tutorial related..

jhonselaint26

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Need help on 2D character controller[SOLVED]
« Reply #6 on: February 09, 2016, 08:02:49 AM »
playmaker no have set velocity2d...?

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Need help on 2D character controller[SOLVED]
« Reply #7 on: February 09, 2016, 11:04:00 AM »
Hi,

Welcome to the forum.

There are loads of custom actions around which work just as well as the originals that came with playmaker. (Isnt it amazing lol?)

Here is the 2d action pack:

https://hutonggames.fogbugz.com/?W1150

Also there is a vector2 action pack about somewhere, which could be useful if you go for 2d, just google it.