I was working with one of my projects earlier today and I noticed a problem with my camera. In the project below the camera will pan right or left when the cube player gets near the edges of the screen. However I noticed that from the players current location that moving it straight down towards the camera on the Y axis that the player seemed to be drifting quite heavily. I checked my settings and couldn’t put my finger on it. I finally realized that it was my perspective that was making the cube appear to drift right. I did this by simply walking down the seam there.
Now common sense does tell me that using perspective will cause the cube to appear to move right even though it is just traveling along Y. I just didn’t realize that the perspective effect would be so heavy that I actually thought that the cube was drifting. Sometimes almost appearing to be moving sideways as much as it is moving down. Is there a good setting or good rule of thumb for the perspective view that will still give me a good sense of perspective without it seeming so exaggerated or so “perspectivy”?
Normally the ground will have a texture which gives a visual cue to show the effects of perspective. When the ground is undetailed then it’s easy to get strange visual effects.
Even so, the perspective commonly used for BGE (about 30-35) is good for first person but not so good for other games.
I’d recommend 60 or even 120 with the camera further away to give a flatter view if you’re doing an RTS or third person game. This will avoid the fish eye effect you get with wide angle lenses.
The cube is not “drifting”. It moves along y. You expect it to move towards the camera, what you did not tell it to do. The cube does not even care if there is a paparazzi …camera :D.
You could make the cube turn to the camera and let it move forward (locally).
I tend to use a perspective angle of around 90 degrees, for FPS-style games. I also tend (these days) to chuck a subtle barrel distort 2D shader on things. This is because no optical system is as exact as a projection matrix: your eyes have a field of view of nearly 180 degrees, but a camera of even 120 in any game engine makes things in the middle appear tiny. There’s a good explanation here.
I don’t do his fancy math, but just do a simple fish-eye spherical distribution. You can find the shader I use in this post.
Yes, as smoking_mirror says: adding textures allows the eye to calculate the perspective for itself.