#Help with gyroscope

1 messages · Page 1 of 1 (latest)

obsidian horizon
#

How do I make the character move up and vice versa when the screen is tilted up? Help please

keen thorn
#

Yeah it's just one entire script, you need 3 local vars: sensibility(for sensibility), speed(for the speed build up), and max speed(for the speed limit)

#

The script is always checking if the phone roll angle is higher or lower than the sensibility, if it is it'll check at what angle it is, if it is higher than zero(1,2,3...) then it will make the speed higher(making it go up), if it is lower than zero(-1,-2-3...) it will make the speed lower(making it go down).

#

Then the speed limit, where it checks if the max speed is reached, if the high max speed is reached then it'll set the speed to the max speed, if in the other case, if the low max speed is reached, then it'll set the speed to the max low speed(negative max speed)

#

Now, if if the phone roll angle is higher AND lower than the sensibility(negative and normal), it will put the object as not moving(speed 0)

#

I think it's pretty much just that so

#

Tell me your questions or if you have any problems with zat

#

@obsidian horizon

obsidian horizon
#

@keen thorn wow, BIG thanks💯