Isometric 2.5D (mixed 3D and 2D pre-renderred background) game and 2 cameras
I try to create a isometric game. Player is a 3d model and background is pre-renderred images. I use 2 cameras: 1st point to the plane and 2nd camera for 3d model. 2nd camera is under a viewport, which then becomes a sprite3d visible in the 1st camera.
Because of different projecting angles, positions of pre-renderred images and 3d models are not aligned now. If I move 3d model 2 units, then in the 1st camera its projection only move 1 unit.
How should I resolve this issue or any alternative method rather than using 2 cameras? Any enlightening would be appreciate!
Hi @pennyloafers , no, both cameras are orthographic. I figure out the issue as below, do you have any idea how to resolve it?
It is about movement of 1st camera and viewport sprite. I plan to place this sprite as a child of 1st camera so they move together, but this make all the projections of all 3d objects move across the 2d background.
If the viewport sprite is independent with the 1st camera, then the movement is correct, but the the projection of 3d object will disappear when it goes pass the viewport sprite border. Kinda loop here. So I will need the size of viewport equal to size of entire map to keep projection image visible, I think it is not a good idea.
The repo is here: Github
I think you will need a combination of the 2.5 camera and viewport sprite move with the player. but only move on one or two axis. I think if you make those two children of the player it will work more like you want.