Smooth Gamepad Rotation

0 favourites
  • 2 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hi all!

    I'm currently working on a twin-stick top-down shooter and the primary form of input right now is a gamepad. The basic setup is similar to other twin-stick games; the left stick is used for strafing (moving your character up, down, left, right) and the right stick is used for rotating your character to aim.

    This is the first time I've used the gamepad function (I'm not hugely experienced with Construct just yet). Getting the strafing to work on the left stick was extremely simple and worked right away, but I haven't been able to find a smooth solution to rotating the player with the right stick. The best I have come up with so far is getting it to snap to 8 different 45 degree angles, which is far from ideal.

    I couldn't find a tutorial on this after searching on a couple of different occasions, but apologies if there is one and I've missed it. If anyone has come up with a solution to this themselves though I'd greatly appreciate some help! If you need any more information let me know, I can also provide a .capx if necessary.

    Thanks, Ashley

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's a pretty simple twin stick example that uses the 8-direction behaviour. I think you'd be better off ultimately using the custom movement behaviour, as the player movement in 8-direction is a bit too stilted for this sort of game, but you should get the general idea from this.

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