Pyramid colours.

Hi

I want todo a project to learn unity3d. I have wall of cubes right and I have figured out how to select one with the mouse and colour it. But I would like to colour not the whole cube but one side of it.
Whats the best way todo this? Can you colour one side of cube?

cube.transform.GetComponent<Renderer>().material.color = new Color(1.1f, 1.0f, 1.5f);

How can I change this to get the vectors coloured?

I don’t think the generic cubes are UV unwrapped so there isn’t a “side” to the material… it just applied to all of it.

Lefty is right. (chortle)

You need a custom cube that has a different material on each face.

1 Like

Or you could place a plane that’s a different colour a tiny bit in front of the side you want to colour and turn it on and off.

The easiest way for you will be to create cube prefab from 6 planes, then color just one plane.
There are more efficient ways to solve the problem with custom material but you probably don’t want to deep into shaders now