setting inclenometer to 0

Get help using Construct 2

Post » Wed Nov 27, 2013 1:46 am

how do you "reset" the inclinometer to 0 degrees?

thanks
Dan
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Wed Nov 27, 2013 2:09 am

make an event, when X happens (layout ends, restart button pressed, whatever you choose) -> set angle to 0 degrees.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Wed Nov 27, 2013 6:21 am

thanks,im afraid I don't understand though...its the measure of tilt that I want to set to 0 when the device is level...like calibrating the levelness of the device.I don't see where there is a place to set the angle to zero...
thanks
B
8
S
3
G
1
Posts: 87
Reputation: 1,493

Post » Wed Nov 27, 2013 6:35 am

Oh, gotcha. Sorry I misunderstood the questions. Please disregard everything I said.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Wed Nov 27, 2013 7:40 am

The touch object in C2 works with the values alpha, beta and gamma.
These values come from the device itself and are therefor not editable.
you could set these values to global variables and use the global variables in your game for reference.
If you want the player to decide when the device is leveled, create a second trio of global variables which you set to the negative values of alpha beta and gamma on click and set your first trio every tick to alpha value - second alpha, etcetera..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Nov 27, 2013 5:33 pm

thanks!
B
8
S
3
G
1
Posts: 87
Reputation: 1,493


Return to How do I....?

Who is online

Users browsing this forum: apalm1341, blissfulwizard, Yahoo [Bot] and 15 guests