Join Todd Perkins for an in-depth discussion in this video Detect collisions, part of iOS Game Development with Swift 2.0 and SpriteKit.
- So now that we've looked at how physics work…when you're building a SpriteKit scene,…let's look at how we can handle physics in our code.…Now, I mentioned briefly that you can handle…physics properties through a Sprite's physicsBody property.…So that property enables you to access…the various physics properties once you've defined…a physics definition.…For example, if we look at our Ball file,…and we select a ball, we see that it's dynamic,…allows rotation, and these are true or false,…as we can see with the check boxes,…"Friction," "Restitution," et cetera.…
These properties can all be modified in code…using the ball's property called physicsBody.…So now let's say our next goal…is to start actually detecting collisions.…So we want to shoot balls out of the cannon,…and just respond when it's bumping into other objects…because when you make a game and you build a physics engine,…you want to make sure that you know…what object is touching what other object,…and when that contact occurs.…So I'm going to save Ball, save GameScene,…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.