How do I read Gamepad axises in best way for this...

0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hello.

    I have added events to make the movement a little more responsive and polished.

    It works for keyboard.

    Keyboard is "On Any Key released"

    But for Gamepad direction it is very different beast. Not only for its numerous values for both X and Y axises..

    But also for no "released" trigger that is simple to use, no the value is feeding out all the time continuous.. so if value is 0, it will trigger value 0 every tick (or every time it is sampled by the browser)...

    I thought maybe not add "Trigger once while true". But to work with the OR block for all the different axises..

    Or maybe I am totally wrong in my idea.

    The code for keyboard is here:

    How would you do it for gamepad to get a nice trigger that is like "On Key Released"?

  • I came up against this very thing. I haven't perfected yet, but this is what I've been working with:

    So far I'm only using it for RIGHT/LEFT

    Based on the axis I set the direction state to be either right or left. Then when the player let's go (Axis = 0) check what the state was last.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)