Blueprint Dice Pack
Unreal Engine Tutorial
Unreal Engine Tutorial
A little tutorial on using the asset.
Select any of the available dice examples and create a copy of it.
For example, "Sphere" are used, you need to arrange as evenly as possible along the edges of the dice. If you don't have enough "Sphere", then copy more.
Attention: "Scene" rotation and location should be equal to 0.
Go to Event Graph
Find "Make array" and connect your spheres according to the result of the face. Example: if the minimum number of dice is 0, then on the verge of 7, then we connect with 7 in the make array, if with 1, then we connect 7 with 6. (later you can correct the result in the code, add, subtract or multiply, etc.)
By default, all new dice gives the result starting from 1, this is easy to correct.
If you don't have the "FCalculateValue" function, see the screenshot.
Open the function and use as in the example from the screenshot:
Now place your blueprint with dice on the level and click the "Calculate Faces" button and copy the "Face Normals" variable.
Navigate your blueprint again and paste the copied data into the variable.
The setup is complete.
You can find an example in "BP_DicePawn" how to call a impulse function or make a grab.
All dice are children of "BP_Dice_Template", there you will find comments to the code that will help you figure it out.
If you have any questions, please write to me by mail: myalreadyday@gmail.com