Instruction

Heads up... You're reading this book for free, with parts of this chapter shown beyond this point as scrambled text.

Using Reality Composer Pro in combination with RealityKit, you can add some interesting and life-like mechanics to the app. You’ll want to score a goal and hear the crowd roar when you do. On the Vision Pro the user can experience this while enveloped inside the game — which is totally different than the experience on an iOS or macOS device.

The Vision Pro gives your app the power to enter the user’s space. They’ll feel like they are inhabiting the experience you create. By adding a particle emitter, you can add realistic motion effects. For example, you can build clouds, add a flame, recreate smoke, a star field or shower the player with confetti.

Reality Composer Pro includes the ability to add particle emitters to the scene in general or attach a particle emitter to an entity. In the Inspector, you can adjust the emitter properties to make them run intermittently, constantly, or on a loop. You can set the shape, the direction, the speed, and more.

Next, the particles themselves can have individual parameters. You can control the color, even change that over time, and manage the shape, speed, and distribution of the particles. By adjusting the birthrate and lifespan, you control how the emitter behaves over time. All of this furthers the realism of the effect of your scene.

Go beyond the visuals by including sound. Audio can also be attached to the scene or to an individual entity. There are three types of audio you can add. Spatial audio can come from a specific position and direction, such as a car speeding by - complete with change in pitch, relative to the viewer. Ambient audio can come from a direction and stays the same. Channel audio is the more common type that’s present in left and right channel and doesn’t change.

With spatial and ambient audio sources to perceived volume and source change as the user turns their head. For example, with the Vision Pro playing a movie, the sound seems to come from the video. If the user turns their head during playback, the audio stays relative to the video window.

There are many more ways to take advantage of the spatial concepts the Vision Pro provides. For now, you’ll focus on adding the ability to recognize the player’s attempts to score. If they’re successful, you can shower them with praise using a cheering crowd and lots of confetti. The good news that you won’t have to clean up after the game.

Move on the demo to learn how to apply these effects.

See forum comments
Download course materials from Github
Previous: Introduction Next: Demo