Screen Division using Android + Unity

1
People, good afternoon.

I'm having a project where I need to get a view of a particular object at 4 different points and position them to look something like this: link

Does anyone have any idea how I can do this? Can you do it inside Unity itself? Or should I get my Unity project and find a way to adapt to Android Studio?

    
asked by anonymous 01.10.2015 / 22:37

1 answer

1

I can not see the video but by the description I imagine you are trying to create 4 viewports with views of different points of your object.

If this is easy to reslver, simply adjust the line of each of the 4 cameras with normalized values.

To test create an empty GameObject and 4 cameras inside it, a script to manipulate these cameras and adjust their line, something like:

public class CameraControl : MonoBehaviour {

    public Camera[] cameras;

    // Use this for initialization
    void Start () {

        cameras[0].rect = new Rect( 0.0f, 0.0f, 0.5f, 0.5f );
        cameras[1].rect = new Rect( 0.5f, 0.0f, 1.0f, 0.5f );
        cameras[2].rect = new Rect( 0.0f, 0.5f , 0.5f, 1.0f );
        cameras[3].rect = new Rect( 0.5f, 0.5f, 1.0f, 1.0f );
    }
}

Drag this script to the parent GameObject of the cameras.

Include an object in the scene and position the cameras as you want them to be showing your object (in 4 different positions and angles).

Run the game and make sure it is + - this;)

    
12.11.2015 / 19:37