5 minutes
Frame the Table
"distance": 55 went into the scene in lesson 1 and has been a guess ever since — a number with no relationship to the table it's pointed at. Last lesson the walls stopped guessing. They read the table's dimensions off the bus and lay themselves out. The camera still guesses, and right now it guesses badly: at that radius the playfield takes up under half the height of the frame, adrift in dead space. Resize the table and the camera doesn't move at all.
Distance is only half of it. The other half is field of view, and ArcCamera has no knob for it — nowhere in its props does the word appear. A pinball table is a tall, narrow rectangle viewed down its long axis, which is the worst possible shape for a default 3D camera. You want a wider lens and a shorter throw, and you want both derived from the table rather than typed in.
Add PinballCamera beside ArcCamera
PinballCamera creates nothing. It has no mesh, no camera, no handle of its own. It sits on the same entity as ArcCamera and takes over the framing that camera already owns:
alpha: 1.5708 is a quarter turn — the camera sits on the table's centreline. beta: 0.55 tilts it about 31 degrees off vertical, and minBeta/maxBeta pin it there so the tilt is the only tilt. That much was already true last lesson. The three new numbers are the whole component:
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.