Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use the gyroscope to make a "paintball" stay where it hits in an augmented reality app?

As I "shoot" a paintball and it impacts, I need the impact to stay in the same relative position where it hits. I realize that I will have to specify some sort of distance factor to make this work properly.

like image 613
Marsman Avatar asked Nov 25 '25 12:11

Marsman


1 Answers

For augmented reality, you generally need azimuth and elevation. That can be found by using trigonometry to figure out the angles between your device and the target.

http://www.invasivecode.com/blog/archives/1435

There is a simple set of code that shows how to do that. Now the big problem, which you mentioned was figuring out the distance. You could do a preset distance and figure out your azimuth and elevation that way, or another way it's possible to do would be take a picture and track the movement of that point, but that would be a bit more difficult.

There are some development kits that offer that sort of feature, of tracking a marker in the view, but I don't have experience implementing anything like that. Here is an example using Unity3D

http://www.slideshare.net/aquarioverde/introduction-to-ar-with-unity3d

like image 82
Steven Marlowe Avatar answered Nov 27 '25 05:11

Steven Marlowe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!