schteppe / p2.js

JavaScript 2D physics library
Other
2.63k stars 330 forks source link

Help with resizing P2 Box? #369

Open eproasim opened 1 year ago

eproasim commented 1 year ago

In the demos, I see that the engine will immediately respond to a P2Circle's radius being changed, but I can't seem to replicate the behavior with a P2Box. I've tried changing the height and width and then updating the area, boundingRadius and AABB on the shape as well as the P2Body, but the result always seems to be the original dimensions of the box.

Is there something I'm missing here, or are you unable to resize a P2Box after it's been added to a body?