Change shape parameters in box2d

edited October 2013 in Library Questions

Beginning to use box2d and have a basic question. Having created a shape, in this case a circle with radius r, and added it to a body can I then change that radius later to make the shape grow/ shrink? Can't see how. Total ( almost) newbie. Thanks, Andrew

Answers

  • edited October 2013 Answer ✓

    Dunno box2D library, but... in Processing, once a drawing is rendered in the canvas, there's no easy way to remove it! @-)
    Standard procedure for dynamic drawings (animation) is clear whole canvas w/ background() or clear();
    and only then, re-draw everything at different positions or sizes!

  • Thanks. Box2d handles object physics behind the scenes and keeps track of object coords, rotation, etc. I then have to write code to draw it to the display.

Sign In or Register to comment.