O'Reilly logo

Build iOS Games with Sprite Kit by Josh Smith, Jonathan Penn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building Paddles with Bodies, Pins, and Torque

Let’s face it: we can’t call this a pinball game without paddles. It’s the player’s sole point of control in the game (after launching the ball, of course), and we want to make it feel just right. We want paddles that appear to have weight as they snap up when triggered and fall back in place when let go. Let’s think through the way a paddle is designed and see what we can use from the Sprite Kit physics toolbox to implement it.

In essence, a paddle is a bar attached to an anchor, forming a pin joint that allows it to spin around, yet it’s limited in range of motion. The paddle rests at a certain angle until flipped by an angular force, causing the box to swivel around the pin to its maximum angle, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required