Question

I am experimenting a bit with the iPhone 3GS and its magnetic sensors. It is quite simple to get the heading and the angle of the north pole seen from the top of the device. Also getting the position of the device itself via accelerometer is quite easy. But getting it all together deserves some math knowledge regarding vector calculations I guess.

So what I am interested in is a quite simple way to do those calculations and apply them to an UIView that I put into my camera overlay. For example I would like to fixate a UIView at the north pole on the horizon. This should also work when I tilt and rotate the device. Great would also be if a 'transform' could be applied to the UIView so it is rotated to always show up.

Another thing which would be needed might be to get the correct relations between the camera view field and the object coordinates. If these match exactly in theory the object should stick and overlay always the same objects in reality if the person does not move.

Any samples? Any ideas? Any code not using OpenGL ;) Thanks.

Was it helpful?

Solution

Might want to take a look at ARKit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top