Split Screen and Control for 2 Players


Today the split screen was added, along with the ability to control each player (cars), with WASD, for player 1, and with the arrows for player 2. The latter change, was achieved by creating a new input axis in the project's inputs, similar to the "Horizontal" and "Vertical" axes, with the subtle change of having no alternate keys. With this, the player 1 can only be controled by the WASD keys, and the same is applied for player 2 with the arrow keys.

As for the split camera, it was achieved by creating a new camera object, and changing its public variable "Transform" to the game object corresponding to the car of player 2. After the second camera's creation, the split of the screen was completed by changing the viewpoint of each camera, in order for them o occupy the same rectangular area, splitting the screen horizontally.

Leave a comment

Log in with itch.io to leave a comment.