Gamepad rotate and move

Get help using Construct 2

Post » Thu Feb 14, 2013 5:12 pm

...or even the further you push the joystick the faster you turn ...?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Thu Feb 14, 2013 9:08 pm

@RamPackWobble

It's nearly there, but for some reason the main 90 degree angles (up, down, left and right) have a dead zone to them of around 15 degrees. I also can't figure out how to sort it out so the number doesn't change when you don't move the stick.

I guess this behaviour still needs some tweaking?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 930
Reputation: 9,358

Post » Fri Feb 15, 2013 8:24 am

to fix the don't change direction when the stick is centered could you put in a condition that where you check if the stick is being held before the point in this direction :

something like...

is gamepad>joystickRight X or Y position greaterthan abs(50)
   then
   turn player towards the same direction
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Fri Feb 15, 2013 9:06 am

Also, to fix the first issue, using RawAxis creates a better result. Looks like this could potentially sort things out for me, but it's a little more complicated than I expected.

C2 is obviously spoiling me
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 930
Reputation: 9,358

Post » Fri Feb 15, 2013 9:06 am

Have I got it right that

Gamepad.RawAxis(0,0)

should return a value from -100 to 100 depending where I have the leftstick x position ?

all I get is -1>nothing>1

see :

https://dl.dropbox.com/u/143636437/temp/joytest.capx
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Previous

Return to How do I....?

Who is online

Users browsing this forum: nimos100, tarek2 and 23 guests