Skip to content

Hang Glider

Early VPW table development with comprehensive drop target physics implementation and RTX shadow work.

Build Guide

Primitive Pivot and Import In-Place

Round-trip workflow for pivot-adjusted meshes:

  1. First import mesh in-place (don't worry about pivot)
  2. Center object in Blender and set pivot correctly
  3. Re-import to VPX overwriting original with "place at primitives position" checked
  4. Mesh ends up at correct position with pivot wherever placed in Blender
  5. No manual repositioning needed in VPX

Roth Drop Target Orientation

Roth drop target setup (critical for proper physics):

  • Pivot centered on X/Y, at or just below playfield on Z
  • Default orientation: Horizontal facing drain (all Rot and ObjRot at 0)
  • Use ObjRotZ to adjust to horizontal if needed
  • Use RotZ to set angle on playfield (e.g., RotZ=78 for angled bank)
  • DTMaxBend positive if facing correct direction (negative if backwards)
  • Primitive and VPX target must have matching RotZ for brick physics
  • Hit threshold 0.5 or 1 for EM tables

If primitive backwards: Either rotate pivot 180° in Blender or use negative DTMaxBend.

Baked Primitive Lighting Settings

Baked primitive settings:

  • DisableLighting = 0 (not 1)
  • DisableLighting From Below = 1 (for metal/non-translucent materials)
  • Prevents light from passing through solid objects
  • Blown out appearance if DL=1 and DLFromBelow=0

Scripting

Primitive Rotation Setup for Animations

Primitive animation setup rules:

  • Primitive default position should face directly forward or 90° to side
  • Use RotZ to rotate to correct playfield placement (not ObjRotZ for placement)
  • This allows RotX/RotY to work properly for animation
  • Set as not collidable, Toy, Static Rendering unchecked
  • If using ObjRotZ for placement, RotX/Y won't behave as expected

Alternative approach: Use ObjRotZ for placement, RotXYZ for animation. Works when primitive parallel/perpendicular to axes.

Drop Target Reset Height Calculation

Drop target reset height calculation going to 350 units instead of 10. DTAnim timer interval affects calculation. Timer set to 1000ms for debugging (slo-mo animation) caused massive reset height.

Calculation based on 10ms timing. Keep DTAnim at 10ms interval or recalculate DTDropUnits accordingly.

Physics

EM Flipper Tricks Without Trajectory Correction

EM tables: Add flipper tricks code but NO trajectory correction. Flipper tricks functional on 2" flippers too. Catching on short flippers challenging but fun.

No polarity values in nFozzy tutorial for EMs - requires custom tuning if desired.

Roth Drop Target Benefits

Roth drop target advantages:

  • Multiple targets can drop with single ball hit (realistic)
  • Targets can brick (hit hard but don't drop)
  • All targets slightly over-raise on reset (nice visual)
  • Crazy math for ball velocity corrections allows "passing" into target before deflecting
  • VPX targets immediately deflect like solid wall (unrealistic)
  • No VPX target objects used (all primitive-based)

Troubleshooting

Drop Target Bricking Not Disabling

Drop targets not dropping consistently. Issue: DTEnableBrick=0 not fully disabling bricking. DTCheckBrick sub still returning 0 (won't drop).

Root cause: Perpvel and perpvelafter both positive = not hitting front face of target. Caused by using ObjRotZ instead of RotZ for orientation. Move values from ObjRotZ to RotZ for correct calculations.

Ball Shadows Disappearing Over Playfield Holes

Ball shadows disappear when rolling over lane switch holes. Cause: Ball X/Y properties become undefined over PF mesh cutouts.

Solutions:

  1. Remove PF mesh dependency - use arbitrary invisible plane same size as PF
  2. Use alpha holes in PF image instead of mesh cuts + VPX walls for plywood texture below (TFTC method)
  3. If using primitives for shadows: Remove shadow's Z-position dependency
  4. Better: Use flashers for shadows (no depth bias issues)

RTX Ambient Shadow Lightening Near GI

Updated ambient shadow to become less dark when close to RTX GI light sources. Creates more realistic lighting interaction.

Challenge: Avoid lightening shadow where it overlaps RTX shadow without adding more position calls (performance).

Game Knowledge

EM Over The Top Feature

Bally EM "Over The Top" feature (mid-70s):

  • Early production: Score rolls over 99,990 = buzzer + backglass light flash for ~2 seconds
  • Later production: Added 100k relays, permanent 100,000 light instead
  • Some tables (Hang Glider) have both systems
  • Buzzer uses flashing bulb as mechanical timer (heats up, bends to disconnect, cools, reconnects)
  • Timer duration varies with room temperature

Implement: Flash light and play buzzer ~2 seconds when score rolls over.

Historical: German distributor requested 100k relay change because players frequently rolled scores and OTT was confusing for final score comparison.

Resources