playMaker

Author Topic: 2d Flying Character control  (Read 5839 times)

brendang

  • Junior Playmaker
  • **
  • Posts: 63
    • Out to Play Interactive
2d Flying Character control
« on: August 10, 2012, 11:38:33 AM »
Hi All,

So I am trying to com up with a simple yet nimble 2d character controller.  It's harder than it sounds. Easy enough to tie a gameObject to the arrow keys or touch events, but there's that something....else.. not sure if it's inertia, or weight or easing... that I'm not sure how to address.  Take the attached image, a simple mockup. The Orange guy flies through his 2d world, collecting prizes and avoiding deadly pink smileys.  I'd like him to feel responsive, but not like you were pushing a penny across the table with your finger (hope that made sense as an analogy).

I was thinking Itween might be useful as it has some ease options but I wanted to ask here in case someone had some insight that would help me out.  I'm way more designer than the coding guy,  (Hence the love of Playmaker from the start).

Any insight help or example would be gratefully devoured.  Also, if you have a solid mechanic but would like to be compensated, I'm not ripe with cash but would certainly be open to discussing compensating you for a working solution.

Thanks guys, have a great weekend!

Brendan G.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2d Flying Character control
« Reply #1 on: August 13, 2012, 03:59:08 AM »
Hi,

 You need to explore physics. the key it to remove the gravity of your player, and adding forces.

I suggest you first have a real go at the various examples I provided on the user wiki. They are simply and will hopefully start giving you some better understanding of how it all work together. in your case, I would stufy the jumping game, and simply take it from there.

https://hutonggames.fogbugz.com/default.asp?W880

https://hutonggames.fogbugz.com/default.asp?W890

so in your case, try to add force to a physics gameObject that has its gravity checked offm that's your starting point.

 bye,

 Jean

brendang

  • Junior Playmaker
  • **
  • Posts: 63
    • Out to Play Interactive
Re: 2d Flying Character control
« Reply #2 on: August 13, 2012, 01:38:28 PM »
Thanks Jean,
As always your input is incredibly helpful and appreciated.  I'll actually be posting shortly for a dedicated coder to potentially join the project. But if I could get a handle on some of the basic mechanics myself I think it would go a long way to expediting completion.

have a great day!
B.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 2d Flying Character control
« Reply #3 on: August 14, 2012, 02:46:38 AM »
hi,

 Yes, a flying character is not something difficult to begin with, it simply requires a descent knowledge of how physics and unity works, then making it with playmaker is straight forward. Most of your hard work is in finding the physics set up.

bye,

Jean