Question

I am thinking of using a short cylinder as the shape of the chess piece, but then I can't figure out how to make one side of it to be black and the other side to be white.

I want to do it this way as I want to have the pieces flipped during the game, just like we play Othello in the real world.

Edit: In addition to Nigel's suggestion, a "thin" sphere with a "black/white" texture applied to it can also get the job done.

Was it helpful?

Solution

You can use 2 cylinders ("black" and "white") properly ("black" is standing on "white" head) grouped under one parent object. Then:

  1. In "black" cylinder's script set cylinder color to black: this.renderer.material.color = Color.black;
  2. In "white" cylinder's script ... Yep, set color to white.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top