In a game, we add a body for each sprite, the method is:
createBodyAtLocation:(CGPoint) forSprite:(Box2DSprite*)sprite
In which we create the body and we attach it to the sprite in parameter: sprite.body = body;
Then we set the position of the body, but later on in the code, in the update
method, we also set the position of the sprite to the same position as the body. I was wondering: Why are we doing it twice? As we already set the position of the body in the world, and we made a link between the two with sprite.body
?