Analog Stick Position

ozz

  • *
  • Posts: 557
I have set up a game using a controller, but I noticed the input for the d pad is not dislimier from an analog stick, but is there a way to say have more functionality in the stick?  Like for example can I have it so the player presses the stick slightly to the right to walk right or push it all the way to the right to run right?

Luyren

  • *
  • Posts: 2703
Multiply your top speed to the analog input, since it goes from 0 to 1, that's the basic idea.

My top down and platformer movement behaviors both have analog support for that kind of input, so here it is for your consideration: https://luyren.itch.io/
Player Control in the miscellaneous/cutscene pack, and 8 Way Movement in the combat pack.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

ozz

  • *
  • Posts: 557
Thanks that worked great.

Edit: Sorry I thought I'd better include a sample.

« Last Edit: May 31, 2021, 07:01:11 am by ozz »