Smooth Gamepad Rotation

Get help using Construct 2

Post » Wed Oct 30, 2013 4:16 pm

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

Barleyarley2013-10-30 16:17:36
B
5
Posts: 6
Reputation: 375

Post » Wed Oct 30, 2013 4:39 pm

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.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606


Return to How do I....?

Who is online

Users browsing this forum: Euduardo, Kin and 33 guests