Join Todd Perkins for an in-depth discussion in this video Use cameras, part of iOS Game Development with Swift 2.0 and SpriteKit.
- View Offline
- Exercise Files
- Sprite Kit has support for additional cameras.…So, I have my main scene right here,…and I have the camera element…that's in the object library.…So I grab and drop a camera…on to the screen.…With a camera selected,…I can see some information about it,…it says the scale is 1 and 1,…so that matches the scale of my main scene,…and I can control it's position.…Also to look at,…we can control physics for a camera.…
A camera is a subclass of SKNode.…So it does have all those properties,…it can run actions.…So you can get creative with that if you'd like.…I'm going to name this camera,…and I'm going to just set it right in the middle for now.…And what we're going to do is,…when we shoot a ball,…the camera will move…to follow the ball,…and it will follow the ball…and zoom in a little bit.…So,…I need to deselect everything,…change the camera in my scene…to the camera that I created,…and then I've changed my camera.…
So actually, if I wanted to,…I could move the camera right here,…and if we test the application,…then that's where our view is going to be.…
- Creating a new SpriteKit project
- Adding and modifying sprites
- Transitioning between scenes
- Removing child sprites from parents
- Working with gravity, forces, and impulses
- Detecting collisions
- Applying particle effects
- Creating actions and action sequences
- Working with audio
- Creating frame animations
- Using cameras and lights
Skill Level Intermediate
Programming iOS 9 and GamePlayKitwith Tammy Coron1h 32m Intermediate
1. Introduction to SpriteKit
2. Add Physics
3. Work with Particle Effects
4. Work with Actions
Use an action sequence4m 8s
5. Work with Audio
6. Additional Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.