Screen Splitting using Android + Unity

Asked

Viewed 69 times

1

Guys, good afternoon.

I have a project where I need to take a view of a particular object at 4 different points and position it in order to look something like this video:https://www.youtube.com/embed/yZDGQmwM3jE

Does anyone have any idea how I can do this? Is there any way within Unity itself? Or should I take my Unity project and find a way to adapt to Android Studio?

1 answer

2

I can’t 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 it is that easy to pull, just 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 tracks, 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 camera parent Gameobject.

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

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

  • I ended up solving it differently, I changed the image and adjusted it to simulate the video.

  • https://www.youtube.com/watch?v=Y60mfBvXCj8 A video similar to the one I posted.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.