How do I stop gamepad Rstick snapping back to 0?

Get help using Construct 2

Post » Thu Feb 05, 2015 11:49 pm

Hello I have setup a Gamepad in events, it works great but it keeps snapping back to 0, is there an easy way to tell it to stay where it is after I take my thumb off right stick? here is a snippit of what my event looks like any help would be great thanks. :D
You do not have the required permissions to view the files attached to this post.
B
10
S
5
G
2
Posts: 37
Reputation: 1,992

Post » Fri Feb 06, 2015 5:58 pm

Instead of triggering the actions by the direction of the thumb stick, you could set a direction variable on the sprite object. Then the event to trigger the action would be the value of the variable. Since a thumb stick doesn't directly spring back 0 but could over shoot it a little, you would want the axis greater/less than an acceptable value so the player doesn't accidentally windup walking the wrong direction. Also you would have to set up another event specifically for setting the variable back to 0.

Note, using a value of 0 with a thumb stick or joystick always has the possibility of causing adverse affects when the player releases it. If the player pulls the stick to it's farthest right position and releases it for example, it could spring back to the left a couple degrees causing the system to reset the value to the opposite of what the player wants.
B
39
S
12
G
11
Posts: 331
Reputation: 7,727


Return to How do I....?

Who is online

Users browsing this forum: richcoz81 and 33 guests