Join Todd Perkins for an in-depth discussion in this video Use physics fields, part of iOS Game Development with Swift 2.0 and SpriteKit.
- So let's talk about gravity fields.…Gravity fields enable you to apply gravity to…specific objects in specific ways.…So, I have some objects on my screen and note that…I have no gravity, I've turned that off in my scene.…I don't have any code at all…it's just a blank SpriteKit scene and these…balls here do have a bounding circle physics type.…They're dynamic and they are affected by gravity but…right now there is no gravity so if I hit animate…then nothing happens.…
So let's look inside of the object…library to find these gravity fields.…So I'm just going to click and drag a linear gravity…field out and see what happens when I click animate.…The objects start to move up, with the gravity field…selected I can adjust it's properties in the…attributes inspector so I can make gravity negative…by changing one in the strength field to negative one.…Now the objects move down when I click animate.…I can make them move down more quickly…if I change the strength for example to negative ten…and there they go.…
So I can adjust these properties and using…
- 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.