Forces and impulses affect objects that have physics bodies that are set to dynamic. This movie shows how to apply forces and impulses and explains the difference between them.
- [Instructor] In SpriteKid, forces allow you to update…the velocity of physics objects using code.…Here on my screen I have a character…with a physics body attached to it…and the sky is dynamic.…So you can see his settings right here.…I have the ground…and I have this platform.…Note that the platform has dynamic…and is unchecked allows rotation and affected by gravity.…So let's say I wanted to have a moving platform in my game.…Well one way to accomplish this is to…adjust the initial velocity property inside…of the SpriteKid scene editor.…
So if I wanted the platform to move…toward the player in this case…I could change DX to for example…negative 30.…When I hit the animated button…you are going to see the platform moving…at a constant pace.…This is because I have unchecked affected by gravity…and I've set Friction, Restitution,…Linear Damping, and Angular Damping to zero.…So we have this constant velocity…because nothing is slowing it down.…Now let's look at applying that as a force using code…so I'm going to go back to layout view…
- 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
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?
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.