How to add force to dice so it rolls all over the table and it turns in while being thrown
I am making a game where the dice needs to roll with force all around the table. I need it to be flipping and turning while it is being dropped onto the board as well. I guess what I'm trying to say is it needs to look realistic as to a real dice roll.
Comment
Answer by Owen-Reynolds · Nov 28, 2013 at 06:20 PM
To give it a starting roll, can set angularVelocity. There are some fancy ways, like AddForceAtPosition to simulate pushing up on just one edge, but also simple to just assign angularForce directly.
The axis are always global. So rolling "the way the dice is moving" is tricky with this method. This gives it a mostly "rolling north" spin. Spin is in radians/second (so 6 is about 1 spin/second.):
D1.rigidbody.angularVelocity =
new Vector3( Random.Range(5.0f, 9.0f), // end over end fast
Random.Range(-0.5f, 0.5f), // small y-spin
Random.Range(-1.5f, 1.5f)); // small z-wobble
Your answer
![](https://koobas.hobune.stream/wayback/20220613123018im_/https://answers.unity.com/themes/thub/images/avi.jpg)