How do I Add Tilt Controls?

Get help using Construct 2

Post » Sun Mar 23, 2014 12:22 am

How do I Add Tilt Controls? So what I mean is how to I tilt the device and get the character to move in the direction tilted? Thanks!
B
37
S
14
G
3
Posts: 263
Reputation: 4,280

Post » Sun Mar 23, 2014 1:47 am

Try using the "Touch" object and checking Alpha,Beta and Gamma values to capture device orientation, then, simply translate this into commands to move your character...

EG, if Touch.AccelerationXwithG > 3 THEN move player forward (with G takes into consideration gravity)
B
74
S
14
G
1
Posts: 152
Reputation: 5,051

Post » Sat Apr 12, 2014 1:57 pm

Try using the "Touch" object and checking Alpha,Beta and Gamma values to capture device orientation, then, simply translate this into commands to move your character...

EG, if Touch.AccelerationXwithG > 3 THEN move player forward (with G takes into consideration gravity)


Could you elaborate a bit please? For example, if I am at portrait mode and I tilt the device left/right to move 10pixels at the appropriate direction, how would this be?
B
5
Posts: 20
Reputation: 370


Return to How do I....?

Who is online

Users browsing this forum: aquadijoib and 12 guests