# Movimentar personagem por posição do celular

Get help using Construct 2

### » Mon Jun 22, 2015 8:18 am

Existe alguma maneira de movimentar o personagem através da posição do aparelho?
OBS: Eu estou usando o bullet para dar movimento, o que necessito e mudar a direção conforme o usuario movimenta o aparelho Android!
B
4
Posts: 6
Reputation: 212

### » Mon Jun 22, 2015 8:37 am

tor220 wrote:Is there any way to move the character through the phone's position?
Note: I am using the bullet to give movement, what I need and change direction as the User moves the Android device!

Please use English on this forum, if you can't type in English use http://translate.google.com to translate, like I did in the quote..
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

### » Mon Jun 22, 2015 8:40 am

The touch-object can get the angles of the device, you can use these to make your bullet move..

From the manual:
https://www.scirra.com/manual/119/touch

Touch conditions:

Compare acceleration
Compare the current device's motion as its acceleration on each axis in m/s^2 (meters per second per second). The effect of gravity can be included or excluded, but note that some devices only support accelerometer values including the effect of gravity and will always return 0 for acceleration excluding gravity.

Compare orientation
Compare the device's current orientation, if the device has a supported inclinometer. Alpha is the compass direction in degrees. Beta is the device front-to-back tilt in degrees (i.e. tilting forwards away from you if holding in front of you). A positive value indicates front tilt and a negative value indicates back tilt. Gamma is the device left-to-right tilt in degrees (i.e. twisting if holding in front of you). A positive value indicates right tilt and a negative value indicates left tilt.
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