Hey Everyone,
I am developing a quick fps to test out augmented-reality and I ran into a problem. I have a guiText showing me the positing of the AR camera and it seems to be always moving. That seems normal but when I put objects relative to the camera's position, they will fly everywhere.
C# Example:gameObject.transform.position = camera.ScreenToWorldPoint(new Vector3(camera.pixelWidth/2, camera.pixelHeight/2, 30));
The code is called during an object's update; it should put the object in the center of my screen in world space. The problem is that after the first frame, the object will pop in and out of screen because of the camera's movement.
is there someway i can put an object on my screen without it moving sporadically? (and i don't want to use guiTexture, it needs to be 3D)
Try observing the target from an angle (e.g. 45 deg above the plane of the target). This can yield better results for offset models. The apparent distortion is actually helpful in determining the target position and orientation.