Game Development Reference
In-Depth Information
[circlularObject.physicsBody
applyImpulse:CGVectorMake(10.0f, -10.0f)];
This will apply the force on the physics body, which in turn will move the associ-
ated ball sprite as well.
9. Now compile and run the project. You should be able to see the ball moving and
then collide with the boundary and bounce back, as there is no friction between
the boundary and the ball. So now we have the infinite bouncing ball in the game.
Search WWH ::




Custom Search