Hello,
First post here, nice to meet you all ![]()
I have a problem to solve which I’m not sure how to tackle.
I have a Dice - it’s an GameObject with 3D mesh and a box collider. As children, I have 6 planes with texture placed around it to imitate dice sides.
I place the dice in the air and when game starts, I add some force and torque. After it lands what I want to do is to rotate the dice so that the symbol visible at the top is presented in a more understandable way (as per image).

I could try to do the simplest thing, which is just using Quaternion.AngleAxis( X, Vector3.up) but the problem is that I don’t know how much I need to rotate to get to the point I want to be at. For that I would need to get the current angle and calculate it.
However, I don’t know how to get that angle. What I have done is I found which dice axis is parallel to the Vector3.up (by using Vector3.Dot() ), however I’m stuck here as I have no idea how to extract the current angle according to that axis (becuase the X,Y,Z I am getting are still according to the world axises IF I udnerstand that correctly).
Any help would be appreciated.