Compass for mobile phones

Discussion and feedback on Construct 2

Post » Mon Dec 02, 2013 5:30 pm

Has anyone tried to to make a working compass for mobile phones.
Would it be possible with geo locations ?

As someone who has done this, kindly like to share a example.

Thanx.
B
10
S
2
G
3
Posts: 25
Reputation: 845

Post » Mon Dec 02, 2013 5:54 pm

"Would it be possible with geo locations ?"

Not really, since you only have 1 point (and can rotate the display however you want).
What is possible would be determining in which direction you are moving compared to north pole, but since you can rotate your device as you want while moving, a compass-like behavior is not really possible (that you have a needle that always points northwards no matter how you rotate the device).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Mon Dec 02, 2013 6:15 pm

Just use the Touch.Alpha expression.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,661

Post » Mon Dec 02, 2013 6:30 pm

Thanks for the replies. ( me happy )

It's even in the manual my mistake and thanx again Ashley.

The Touch object also provides input from the accelerometer (motion) and inclinometer (tilt/compass direction) if the device supports them.
B
10
S
2
G
3
Posts: 25
Reputation: 845


Return to Construct 2 General

Who is online

Users browsing this forum: Tjums and 16 guests