8Direction behavior not working on gamepad for 4 directions

Bugs will be moved here once resolved.

Post » Sun Mar 16, 2014 5:38 pm

Problem Description
The 4 direction option in the "directions" property of the 8Direction behavior is not working correctly with gamepads. All other direction values work correctly with the gamepad and the 4 direction option works fine with the keyboard but when simulating with the left stick on an xbox 360 gamepad, left and right movement are translated as up and down movement.

Attach a Capx
CAPX attached to this post

Description of Capx
Simple capx which simulates 4 direction movement with left stick and aiming with right stick

Steps to Reproduce Bug

1. Connect Xbox 360 controller
2. Run attached .capx
3. Try to move player sprite right or left using the left thumbstick

Observed Result
Left movement is translated as "up" and Right movement is translated as "down".

Expected Result
Left and right movement of the left thumbstick should be simulated as left and right rather than up and down.

Affected Browsers

Chrome: Version 33.0.1750.154 m

No other browser tested

Operating System and Service Pack
Windows 8.1 (64 bit)

Construct 2 Version ID
Release 164 (beta)
You do not have the required permissions to view the files attached to this post.
Posts: 44
Reputation: 690

Post » Mon Mar 17, 2014 2:49 pm

Closing as won't fix: the same thing happens with keyboard controls. If you hold up and right at the same time, up takes precedence. Since you compare if the axis is greater/less than 0, it is almost impossible to move the stick to the right without registering some vertical movement which overrides the horizontal movement. Change it to comparing if beyond 50 and -50 and it works fine, since it's easy to move the stick to the right that far without registering that much vertical movement.
Scirra Founder
Posts: 25,073
Reputation: 199,682

Return to Closed bugs

Who is online

Users browsing this forum: Google [Bot] and 0 guests