How do I move an object with Accelerometer?

Get help using Construct 2

Post » Wed Mar 26, 2014 10:29 pm

Hello!
I'm already moving an object with keyboard and mouse buttons.

I would like to make the game algo available to Android and iOS. But I need to use accelerometer to move forward and backward.

Is there any good example to do this? I couldn't find it.
Is there any difference on configuration or how to deal with accelerometer input between Android and iOS?

Thank you!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Fri Mar 28, 2014 1:58 am

In the Touch parameters you can find accelerometer controls using:
- Alpha(compass control)
- Beta(Up & Down)
- Gamma(Left & Right)

Hope that helps a bit im still learning the program myself, but found this earlier while I was experimenting with different control schemes.
B
5
S
2
Posts: 105
Reputation: 837

Post » Fri Mar 28, 2014 11:53 am

Thanks! Did you have any opportunity to test with Android and iOS devices?

I have worked with GameSalad and it seems to normalize the acceleration values to both Android and iOS devices.
Once I worked with PhoneGab and the reference values were different from Android and iOS. For instance: Android would use value from -0.1 to +0.1 and iOS -100 to 100.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Fri Mar 28, 2014 9:54 pm

I have just tested with iOS (Ejecta). Is is working just fine!
While in Landscape I use Beta to tilt from left / right.

=)
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Fri Mar 28, 2014 11:20 pm

No I haven't currently had the opportunity to test it on such devices but hope to in future.
B
5
S
2
Posts: 105
Reputation: 837

Post » Sat Mar 29, 2014 12:05 am

@henriquesv @StrangeyD

I've covered some tests here .
B
49
S
15
G
6
Posts: 534
Reputation: 7,195

Post » Sun Mar 30, 2014 3:13 am

Message: StrangeyD is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
TGeorgeMihai wrote:@henriquesv @StrangeyD

I've covered some tests .


That's awesome, really helpful!
B
5
S
2
Posts: 105
Reputation: 837

Post » Sun Mar 30, 2014 5:13 pm

Great guys! Thanks!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests