Essentially I have a game with 1-6 players on a board. To stop all players spawning in the exact same spawn point I’m trying to implement a system where by a cube will rotate each time a player is spawned by the number of 360/number of players and then will offset the players position slightly. So they will all be equally spaced from the spawn cube and the same angle apart. But I am unsure how to add to the transform.position in the cubes “forward direction”.
Transform playerSpawnPoint = this.transform;
float angle = 360 / NumberofPlayers;
for (int i = 0; i < NumberofPlayers; i++)
{
Debug.Log("spawning player " + i);
this.transform.rotation = Quaternion.AngleAxis(angle*i, transform.up);
playerSpawnPoint.position = playerSpawnPoint.position + Vector3.forward ;
Instantiate(playerm, playerSpawnPoint);
}