I’ve got a ‘cockpit’ of a ship that a player can walk around; I’m trying to use the old handy trick of having a static kinematic cockpit to move around in, but the windows should show the view of the active-physics cockpit which is out in the world.
I’ve set a camera up as a render texture and this works decently, but if I make it large enough to put the render texture further away from the player’s view, the resolution is never enough to make this look realistic. If I instead put the render texture right at the window, when the player moves around the cockpit it doesn’t parallax properly and looks obvious that it’s a flat plane with an image on it. I’ve also attempted reversing the normals on a sphere and skinning the inside of said sphere with the render texture, which provided probably the best looking solution, but had distortion near the poles of the sphere.
Any ideas? I have no idea where to even begin to make this rendertexture do parallax
There are a lot of solutions to this problem, and it depends a lot of the specifics of your game.
Have you considered using multiple cameras without a render texture? have the camera rendering outside first, then render the internal camera on top.
A way to solve parallax issues in your example above and when using multiple cameras is to have the camera in the physics cockpit sync its position and rotation relative to the main camera keeping the pov consistent.