Skip to content

Dice Prefab & Face Markers

Face markers are the backbone of both rollers:

  • World roller: reads top face reliably after settling
  • UI roller: rotates the die so a chosen face points toward the camera

Marker rule (critical)

For each face value (1..N): - create a marker Transform - place it on that face - orient it so marker.up points outward (the face normal)

If marker.up is wrong, results will be wrong. Every time. Forever.

Suggested hierarchy

D20_Prefab
  Mesh
  FaceMarkers
    Face_1   (up points outward)
    Face_2
    ...
    Face_20

D6 workflow

  • Put a small empty object (marker) on each face center.
  • Make sure its Y axis points outward from the cube.

D20 workflow

  • Same idea, but the face is a triangle.
  • Place marker on triangle center.
  • Rotate marker so its Y axis points outward.

Common mistakes

  • Markers exist but are rotated by a parent transform (avoid rotated parents).
  • Some faces have no marker.
  • Marker up points inward (inverted).