- Home /
How can I track the position of an Android Device on a small scale
Hello,
My question is, how can I track the position of an Android Device on a small scale?
I figure that the GPS is not exactly viable for this sort of problem since it has a 10 meter accuracy. I would like an accuracy of no more than 1/2 meter (preferably 1 foot). It is possible that the solution to this problem may not even be in tracking device positions, but simply identifying devices.
What I am trying to do is essentially make a Virtual Laser Tag game. The game is basically played in 2 worlds, the virtual game world (henceforth known as The Matrix), and The Real World (that physical plane in which we live where I can see into your eyes, but the moment I do I quickly avert them and pretend you didn't even see into mine). The Matrix is quite simple as it is made up of Capsules that will represent the players. As the players move around in the Real World, each with an Android device, and look around, the positions and orientations of the Capsules in the Matrix are also updated. When the players shoot (a problem to solve later), the Matrix is updated with a raycast from the player's capsule toward the direction that the device is facing. If the raycast also hits another Capsule, that Capsule will be updated with -HP. Theoretically, the damaged Capsule would only exist there if a player is there in the corresponding Real World position.
These positions can be relative to each other if that turns out to be the easiest solution.
I am expecting to make this a multi-player only game since it is designed for emulating laser tag without requiring too much special gear. Perhaps in the future I may open the game up to have a single-player component and create bots for the player to kill, but that's something else entirely.
I considered using AR methods for this, such as Target-tracking using cameras, but it seems that the range that a target can be seen is actually quite limited. I thought that using other methods such as identifying proximity to routers or using ultrasound might somehow work, but I am not a great electrical engineer and wouldn't know where to start or where to go with those ideas.
In reality, simply being able to ID a target on the spot is actually all that I need, but I need a reliable method to do so. This would eli$$anonymous$$ate the necessity of tracking movement, making the game simpler, I think.
Thank you!
-Iuxeayor
Your answer
![](https://koobas.hobune.stream/wayback/20220612082742im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
ScreentoWorldPoint position android issue 1 Answer
GPS doesn't work in AGPS mode 0 Answers
Why is my game object (door) changing rotation in game mode? 2 Answers
How to move character from one room to another? 1 Answer
how do i use touch.Position 1 Answer