logo
By Lawrence

5 minutes

Bumpers That Pay Out

The flippers work. You can hold a ball for a minute now — and the table doesn't notice. Every surface built so far is geometry that bounces the ball and forgets it. Nothing on the playfield is worth aiming at, because nothing pays.

Three pop bumpers change that, and they need somewhere to send their points.

Three bumpers, five components each

Append the centre bumper to entities:

"Bumper_Center": {
  "components": {
    "MeshPrimitive": {
      "primitive": "cylinder",
      "diameter": 1.78,
      "height": 1.5,
      "position": [0, 0.75, -2],
      "material": {
        "diffuseColor": [0.95, 0.35, 0.65],
        "emissiveColor": [0.55, 0.15, 0.35]
      }
    },
    "Shadow": { "castShadow": true, "receiveShadow": true },
    "Physics": {
      "shapeType": "capsule",
      "motionType": "static",
      "restitution": 0.95,
      "friction": 0.02
    },
    "Bumper": { "points": 500, "hitRadius": 1.25, "releaseRadius": 1.7 },
    "PinballLayout": { "zCoeff": -0.0602 }
  }
}

Read the stack top to bottom and you can see the division of labour. MeshPrimitive draws the mushroom. Physics with restitution: 0.95 is what actually flings the ball away — a static capsule that returns 95% of the impact speed. PinballLayout keeps it proportional: z = -0.0602 × 33.2 = -2, so widen the table in the panel and the bumper stays two-thirds of the way up the playfield.

Bumper does none of those things. It scores.

Bumper_Left and Bumper_Right are the same five components with a handful of values changed — position [-3, 0.75, -6] and [3, 0.75, -6], points: 250, mint (diffuse [0.35, 0.95, 0.7], emissive [0.15, 0.55, 0.4]) and amber ([0.95, 0.85, 0.35], [0.55, 0.5, 0.15]), and layout coefficients xCoeff: -0.1875 / 0.1875 with zCoeff: -0.1807.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search