0 Favourites

Smooth Gamepad Rotation

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic Locked topic
78 38,335
Ashley's avatar
Ashley Construct Team Founder
Unread hot topic
0 Favourites
3D Vertex Rotation
33 10,052
linkman2004's avatar
linkman2004
Unread hot topic
0 Favourites
How do I smooth move forward?
29 1,814
gumshoe2029's avatar
gumshoe2029