Answer the question
In order to leave comments, you need to log in
How to track the position of the phone in space?
Greetings, the problem is that I need to receive data from the phone, and, depending on its position, move the cube in the game.
For example: I raise the smartphone up, the cube also rises, etc.
As I understand it, this can be solved using an accelerometer, but I don’t fully understand how.
Of course, I tried to register the movement based on the axes of the accelerometer, but it apparently only reads the rotation, but not the position, as it seems to me
Answer the question
In order to leave comments, you need to log in
For example: I raise the smartphone up, the cube also rises, etc.
of course I tried to register the movement based on the axes of the accelerometer, but it apparently reads only the rotation, but not the position, as it seems to me
And how is the accelerometer supposed to determine the height? First, find out what it is, I can offer work with a camera for these cases, for example:
https://www.air-gun.ru/social/readtopic/prostoy_da...
It won't work in its pure form, but I think you can think of it.
Another option, you can try to read the rise according to the accelerometer readings, it is unlikely that people will lift the phone perfectly up.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question