HTML and CSS Reference
In-Depth Information
Applying the force
There are two ways to apply force in Box2D: ApplyForce and ApplyImpulse .
In Box2D, force is often consistently applied to a body for a while. For example, we speed up
a car by applying force. We use impulse, for instance, to apply a one-ime force. Throwing a
ball is more like an impulse than a constant force.
Explaining the construction of the physics world
The hoop is constructed using three staic bodies—a board and two squares, as illustrated in
the following figure:
board
square
Classified intel
In the real world, when basketball players throw the ball, they spin the ball as shown in the
following figure:
We make the ball spin by applying torque to it while the ball is thrown.
 
Search WWH ::




Custom Search