Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Eduardo Rojas
4,084 PointsHow does velocity works?
Im asking you this because i have this objects "falling" but the problem is that after "bouncing" a little (around 3 or 4 times) it just stops moving
1 Answer

Robert Bojor
Courses Plus Student 29,439 PointsHi Eduardo,
You are actually having "problems" with the gravity of the Physics World. As soon as you decrease it, or just set it to 0, your objects will bounce around unhindered by gravity.
self.physicsWorld.gravity = CGVectorMake(0, 0);
However, you are still going to have objects slowing down with each contact they make with other objects because of friction, linear damping and restitution.
Eduardo Rojas
4,084 PointsEduardo Rojas
4,084 PointsOh, ok thank you
Robert Bojor
Courses Plus Student 29,439 PointsRobert Bojor
Courses Plus Student 29,439 PointsYou can read more about friction, linear damping and restitution and many more properties here: https://developer.apple.com/library/ios/documentation/SpriteKit/Reference/SKPhysicsBody_Ref/index.html