Camera for 2.5D 2P Platformer
Hi. I'm new to using Unity, and I want to make 2.5d 2p platformer game. I'll use 3d models and 3d background by placing some objects. I'll not use any Z-axis movement for player. I have a difficulty in scripting camera. Before making this, I made a prototype for the game in 2d. At that time, I used orthographic camera to follow players. The logic in orthographic camera was pretty simple. 1. Compute the middle point and set it to the Camera's position. 2. Get players' position to set camrea size dynamically. This worked fine for the 2d.
In 2.5d, I want use perspective camera to do these things. well... the good examples are "New Super Mario Bros Wii" & "Little Big Planet". Currently, I don't know how to script. Currently, I only compute the middle point to be the camera's position. but if the players separate each other, player and objects are stretched as you can see from the image below. Also, if players separate each other too far, players do not appear in the camera.
Any help wil be appreciated.