Add Support for All Devices and Orientations

While not technically a heads-up display (HUD), the D-pad controller and Attack button share a similar quality in that they need to be visible at all times. At the moment, however, once the player moves beyond a certain point, the on-screen controls disappear.

One way to fix this “player movement/control visibility” problem—and the one generally recommended by Apple—is to make the HUD content a child of the camera node. That fix would look something like the image in the Scene Graph View.

images/OperatingTheCameraAndUsingReferenceNodes/scene-editor-camera-children.png

While this isn’t a bad idea, it does limit what you’re able to do, so you’ll learn another way.

But this “player ...

Get Apple Game Frameworks and Technologies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.