- Home /
How can I show a random integer on a cube
I want to make a simple Math game where for example two integers are shown on the screen and the user has to know what is their sum.
So I am thinking about a way to show the integers on cubes. How can I do that?
Thanks in advance.
If youre going to display them on the cube...what I would do is create the cube. Create empty game objects for each face of the cube. Create an array of those empty objects. Create planes with numbers on them. And then develop a system that will instantiate the appropriate number to the face you want.
$$anonymous$$ake sense? Is this what youre looking for?
Answer by Eric5h5 · Feb 05, 2013 at 10:18 PM
Use a 3DText object and parent it to the cube. If necessary, use a shader like this so the text is occluded properly.
occluded properly
Yes...odd that 3DText is visible through everything else, like it's being drawn on by a heads-up display. But I've had a client say that was exactly what they wanted, so maybe it is a feature and not a bug.
It's definitely intentional; the default shader is written specifically to do that.
Your answer
![](https://koobas.hobune.stream/wayback/20220613092221im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Make an object come on the screen at random angles from random sides 0 Answers
Random place changement 2 Answers
Random Genration of Cube 2 Answers
How to make an object/prefab choose between multiple given positions to spawn into? 1 Answer
Mapping Cube to Sphere - Using 64 planes as a cube "side" 1 Answer