Skip to content

PixitGames Dice System

A small Unity dice system that does two things well (a rare event):

  • 3D World Physics Roller: throw real 3D dice into a tray using Rigidbody physics and read the result when the die settles.
  • 3D UI Roller: animate the same 3D dice prefab in front of the camera like a UI element (no gravity), then settle cleanly onto a result face.
  • Optional Result UI: floating numbers pop above each die and fly into a row list that can aggregate (Sum / Highest) and evaluate against a DC (SUCCESS / FAIL).

What you get

  • Dice prefab workflow (markers per face).
  • Two rollers (World + UI).
  • Sample test scripts and optional UI (rows + floating).
  • Settings to make dice feel snappy, heavy, chaotic, or bayblade.

Version: 1.0
Last updated: 2026-02-20

Quick “one-line roll” examples

public PhysicsDiceRoller3D roller;
public GameObject d20Prefab;

void RollD20()
{
    roller.Roll(d20Prefab, result =>
    {
        Debug.Log($"D20: {result}");
    });
}
public UIDiceRoller3D uiRoller;
public GameObject d6Prefab;

void RollD6_UI()
{
    int desired = UnityEngine.Random.Range(1, 7);
    uiRoller.Roll(d6Prefab, desired, result =>
    {
        Debug.Log($"UI D6: {result}");
    });
}
  1. Set up Dice prefabs with face markers.
  2. Pick your roller:
  3. World roller for physical rolls.
  4. UI roller for clean UI-style rolls.
  5. (Optional) Add the Result UI to show numbers and DC success/fail.

Go to Getting Started → Installation.