Log in or register to post comments

Compass

August 3, 2011 - 5:39pm #1

Is it possible to access a compass-type feature in Unity, possibly using this plugin?

I've found code that uses
iPhoneInput.lastLocation.latitude
iPhoneInput.lastLocation.longitude
iPhoneInput.lastLocation.altitude
iPhoneInput.lastLocation.timestamp

to determine direction vis a vis a GPS.

and input.acceleration.y to get the tilt of the device

I currently use the qualcomm plugin to put the video feed on the back of my screen and to put other objects in front of it.

But I'd like to have the appearance of a 3D object in unity be overlayed on my device as if it existed in physical space and without using one of the barcode targets. (It appears in the air far above the viewer.)

If it stayed in the same portion of the screen while the user turned and the camera spun, that'd look odd. I think I need compass functionality to do this.

Any advice?

Thanks,

Ryan

Re: Compass

August 11, 2011 - 3:44am #2

http://u3d.as/2aR

If you have your phone at hand, you can try the demo scene:
http://goo.gl/xi91w

Hope that helps!

Log in or register to post comments