Physics fields are areas where customized gravity is applied to objects. See how physics fields work in this tutorial, and how to make objects respond or not respond to physics fields.
- [Instructor] Gravity fields allow you to apply gravity…to particular parts of your scene or to certain objects.…Let's look at how they work:…on my screen you'll notice that my scene…has no gravity applied currently.…I can apply gravity by filtering for a field…in the object library and you can see…these different fields that we can create.…I'm going to start with a Linear Gravity Field…and just drag and drop it onto the screen…and then hit the animate button.…
So the objects move upward.…Now, it's really important to note that for these to work,…there need to be actually physics bodies on the screen.…So you need to get some dynamic physics bodies.…So if you look at the item, the enemy, and the player,…they all have dynamic physics bodies.…You'll also notice that these are not affected by gravity,…so fields are a different force than the scene's gravity.…Let's go back to the gravity notes;…I'll select it in the document outline.…
And we can adjust the settings inside…of the attributes and Spectre.…So I can change how strong the gravity is…
- Creating a SpriteKit project
- Adding and modifying sprites
- Creating sprites in code
- Transitioning between scenes
- Working with children and parents
- Adding physics
- Detecting and responding to collisions
- Applying particle effects
- Creating actions
- Working with sound
- Adding cameras and lights
Skill Level Intermediate
Game Design Careers with Brenda Romerowith Brenda Romero54m 41s Beginner
Careers in the Game Industrywith Christian Bradley1h 19m Beginner
Building a Game App with the Android SDKwith David Gassner2h 6m Intermediate
1. Introduction to SpriteKit
2. Add Physics
3. Work with Particle Effects
4. Work with Actions
5. Work with Audio
6. Additional Features
Next steps1m 41s
- 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.