Question on Gamepad and angles

0 favourites
  • 5 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • This is the first time I've added Gamepad support to a game so sorry if this is a dumb question.

    Here is the code I added:

    The angle that the player is faces is either in the direction they are moving with the left stick or the direction they are aiming at with the right stick (top down shooter). The challenge I'm having is that when both sticks are idle the player instantly faces right at 0 degrees which can appear robotic. What can I change or add so that when the controls are idle the player remains facing toward the last angle that they were at?

  • This is the first time I've added Gamepad support to a game so sorry if this is a dumb question.

    Here is the code I added:

    The angle that the player is faces is either in the direction they are moving with the left stick or the direction they are aiming at with the right stick (top down shooter). The challenge I'm having is that when both sticks are idle the player instantly faces right at 0 degrees which can appear robotic. What can I change or add so that when the controls are idle the player remains facing toward the last angle that they were at?

    do a try changing this setting in 8-dir behavior properties to 45 degree or 360 degree smooth

  • Here are two ways to achieve this

    Edit: Just noticed a mistake in my screenshot - axis(0,4) is obviously wrong, replace it with axis(0,0)

  • NN81

    Not the exact solution in my case but I appreciate the reply.

    dop2000

    Thank you. I also hadn't considered the drift some gamepads have so your second example is a great help. I'm sure this will help some players who play my game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • NN81

    Not the exact solution in my case but I appreciate the reply.

    sorry my bad english understanding, many times y reply just for up and/or give visibilty on some threads

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)