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! While you're at it, check out some resources Treehouse students have shared here.

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
Eduardo Rojas
4,084 Points

How 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
Robert Bojor
Courses Plus Student 29,439 Points

Hi 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.