Hi,
I’m trying to put the Unity camera into the “real” 3D space by reading the GPS coordinates and converting them to Unity 3D coordinates, and then setting the camera position to those 3D coordinates. I’m also trying to put some objects into the “real” space around the user, so they show up when the user points his mobile device at those objects (I’m using the gyroscope to detect the rotation).
The problem I’m having is that I can’t seem to find a method to convert those GPS coordinates to Unity 3D coordinates so they match up (I know they can’t match up 100%, but in my case they don’t match even slightly). I’ve tried a few methods that were mentioned here, I even tried converting the method found here to C# (the function called llhxyz, along with its related functions that calculate the constants), but even that didn’t give me satisfying results. I am also aware that the ECEF XYZ coordinates are not equivalent to Unity’s XYZ, but even switching them around doesn’t help.
Can anyone push me in the right direction or tell me what I’m doing wrong?