The task is to imitate the roll of a die. On each side of a separate texture - the value of the bone. How to determine which side of the cube is on top?
Update
The problem is that I have a cube as an object. And it is impossible to determine the position of the sides of the cube.
For example:
Conventionally, we denote the sides of the cube 1-6. Cube with position:
cube.position.x=0; .position.y=0; .position.z=0;
I set the rotation of the cube:
cube.rotation.x += 0.02; As a result, on top of me, I first have one side of the cube, then the other, etc. The position of the object itself remains the same 0/0/0. The task is to determine which side of the cube is "above".
As I see the solution to this problem, get the sides of a cube as an object and compare position.y.
How to get the side of the cube? Or other options ...