I want my camera to stay at the center point of my 2 players. The game is running in 2D and the movement takes place on the X Axis.
function Update ()
{
if (ActualLevelSettings.player1 == true && ActualLevelSettings.player2 == false)
{
transform.position.x = hero1.transform.position.x;
}
else if (ActualLevelSettings.player1 == true && ActualLevelSettings.player2 == true)
{
transform.position.x = hero1.transform.position.x + hero2.transform.position.x / 2;
}
}