Tilt controls not working.

Get help using Construct 2

Post » Thu Feb 09, 2017 4:27 pm

Hello World,

Check out the events below, did I do something wrong? I exported it(with intelxdk), installed it on my device(a Philips S398) and I rotated and tiled the device every each way, no matter what I did there was no movement... :(


Image


Thank you.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Thu Feb 09, 2017 5:14 pm

I think gamma on touch is tilt left/right?
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Thu Feb 09, 2017 5:19 pm

Sure, I can try that one too, but even with alpha shouldn't there have been some movement some way?
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Thu Feb 09, 2017 5:26 pm

I think Alpha might detect the rotation of the device from a spin? Like when the device is moving between portrait/landscape. Just a logical guess here. Compass direction implies when the device is rotated flat but not tilted. I think beta and gamma detect the tilt direction.
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Thu Feb 09, 2017 6:53 pm

Well, I've now tried all of em alpha, beta and gamma, I once again turned the phone every which way even jiggled it a bit, nothing...:(
Do I need to check "Uses geolocation" when exporting it from C2, or what's going on guys?
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Thu Feb 09, 2017 7:14 pm

@jeffige didn't you get tilt to work?
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Thu Feb 09, 2017 7:30 pm

Add a text object and debug it.
Text set text to touch.alphaorientation or whatever it is.
Image ImageImage
B
172
S
50
G
183
Posts: 8,440
Reputation: 115,599

Post » Thu Feb 09, 2017 11:20 pm

@VIKINGS @plinkie

First, you have Mobile and Desktop controls together. Won't work. At least not for me. You need to separate your controls. Put Mobile controls in its own group and Desktop controls in its own group. Then activate/deactivate the group that needs the controls.

i.e: If on Desktop > System set Group Desktop Activated - and - System set Group Mobile Deactivated. And vice versa.

Alpha is for tilt on a flat plane.
Beta is for tilt on the Y axis.
Gamma is for tilt on the X axis.

Second, and this is a doooooope! moment, at least it was for me, you need to check that your device has tilt sensors.

Install THIS on your device and run it. If your device has the sensors it should say 'Accelerometer' and the values will move if it does.

Also, try and decrease the Beta/Gamma values. decrease to around 2. This will allow to check the tilt for very fine movements.

Also, you should change the Greater and Less Than TO Greater or Equal and Less Than or Equal.

Other than that, your events/actions look right to me.


Let me know.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Fri Feb 10, 2017 8:07 pm

Well, I tried all your suggestions guys and still nothing... :(((((((((((
@jeffige the keyboard events where already disabled and I don't think it matters if they are in the same group, but just to be safe I deleted them all together for today's tests. I did install that app your recommended and yes the values under "Accelerometer" do change there when I move/rotate my phone. I added equal to greater then/less then and tested with the values at 2 and then again at 4(4 because that seemed to be the most common and easiest to achieve value in that app).

@newt I added a textbox and created an event every tick set text to Touch.Gamma, and indeed it stays at 0. I only tried the text with gamma but I doubt it would change for the other ones, besides like I said the values for all the axis do work under "Accelerometer" in that app.

Any other suggestions guys? For example here's a pic of the plugins when I export with intelxdk, does everything look ok there?

Image
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Fri Feb 10, 2017 8:36 pm

VIKINGS wrote:Well, I tried all your suggestions guys and still nothing... :(((((((((((
@jeffige the keyboard events where already disabled and I don't think it matters if they are in the same group, but just to be safe I deleted them all together for today's tests. I did install that app your recommended and yes the values under "Accelerometer" do change there when I move/rotate my phone. I added equal to greater then/less then and tested with the values at 2 and then again at 4(4 because that seemed to be the most common and easiest to achieve value in that app).

@newt I added a textbox and created an event every tick set text to Touch.Gamma, and indeed it stays at 0. I only tried the text with gamma but I doubt it would change for the other ones, besides like I said the values for all the axis do work under "Accelerometer" in that app.

Any other suggestions guys? For example here's a pic of the plugins when I export with intelxdk, does everything look ok there?

Image


I'll try and look at your stuff probably tomorrow. Really trying to hit a Sunday launch with my own at the time.

Out of curiosity, have you tried seeing if it works on preview LAN?

If it works there it should work after build. No plugins should be messing with it.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests