Implement Touch/Tilt with 8-Directional Movement

Get help using Construct 2

Post » Fri Oct 25, 2013 8:25 pm

Hey,

I wanted to know if anyone has had any experience using tilt controls with the 8 directional movement behavior.

Basically I have a game similar to Helicopter, what I want to do is allow the player to use the accelerometer to move Left, Right, Up, and Down. In the capx example below I was able to get the Up & Down movemnet correct but wasnt able to do so for moving left & right.

Is there a way to set the zero point at the start of the layout so the player isnt positioned to a disadvantage when the game starts?

Any insight on this would be much appreciated

https://www.dropbox.com/s/zr629s8i3f6faw8/HelicopterTilt.capx
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Sat Jul 19, 2014 2:55 pm

Were you able to figure this out? I'd also like to know how to do this.
Play Ball Walker App Store | Google Play | Amazon
Image
B
30
S
5
Posts: 116
Reputation: 2,088

Post » Mon Jul 21, 2014 6:22 pm

Yeah I figured it out but keep in mind accelerometer controls are different for different OS's if not devices
i.e the configuration for tilt controls on an iphone may be different for a Samsung Galaxy

Use Beta and Gamma orientation

Use global variables to help tweak the speed


Reference:

example1.PNG


example2.PNG
You do not have the required permissions to view the files attached to this post.
B
6
S
2
Posts: 151
Reputation: 1,366


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, R0J0hound and 14 guests