Is there a way to update the cpShape. I want to simulate an explosion that pushes other shapes aside and the best idea I have for it is to just quickly enlarge the shape and then remove it.
But how to do this?
The shape is just a circle. So I've been experimenting with creating a new shape, and replacing the old one.
> cpSpaceRemoveShape(space, ball.ballShape);
> cpFloat r = .5 * ball.radius; //radius is a property in my ball class
> cpShape *shapeOfBall = ball.ballShape;
> shapeOfBall = cpCircleShapeNew(ball.ballBody, r, cpvzero);
> cpSpaceAddShape(space, shapeOfBall);
But this isn't working, and I'm wondering if there's a better way to do it with less cpSpaceAddShape calls.