How to make a dice roll like in monopoly?

Hi me and my friend are making a game and I wanted to know whether i have to make a dice roll animation or am i able to use the collision function in unreal , please help I just want to make a random dice roll that has a collision affect with it like in the game Monopoly.

thanks in advance.

I wouldn’t recommend creating 3d animations for dice.
2D animations are fine, but I would recommend a pair of 3d objects in the physics game world.

Create a dice mesh and import it into UE4. Create a collision in the Static Mesh viewer using a basic cube, very important to keep it an exact cube if you want the dice to be random.

Create a new object called dice and add 2 (or how many you need) as static mesh components. Enable their physics (right hand side of editor when selecting the component) and then make sure they match the desired properties (weight, what they will collide with, etc)

You will then want to add a new custom event. When the event is called have it add an “impulse” (Add Impulse node) to the dice and they will be pushed in that direction based off physics. You will want to hook the impulse value to a randomized value.

Things that you can do to improve upon this:

  1. Add some checks to make sure the dice don’t get lost. You could create a clear dome that encapsulates the dies inside, or you can do a location check to see if the dice are too far away from its parent actor.

  2. Dynamically pull the dice values after they have been rolled. You could check to see what the rotation of each dice is to determine how it rolled. Example: If pitch is > 45 degrees and < 135 degrees, if yaw is > 135 and <180, etc

  3. Randomize the dices starting location/rotation. This will add more entropy to the outcome. You can have the warm up command that will move and rotate each dice to a randomized value, restricting it to an area that will ensure they do not go outside the viewport

  4. What happened to number 4?

Thanks for the Response and try out what you said right now.