MoragX Posted February 24, 2015 Share Posted February 24, 2015 Hey everyone, I've making a game with various enemies that are made from balls with various abilities. I'd like one of them to grow and shrink over time, and I'm using the P2 physics module. Changing the size of the displayed sprite is easy with sprite.scale.x/y but I'm not sure what the equivalent command is to update the sprite.shape which is used by the physics engine. So when I scale it, I end up with a large sprite but the original hit box. What is the correct way to handle this? Is it necessary to remove and recreate the shape each time I resize my object? -MoragX Link to comment Share on other sites More sharing options...
valueerror Posted February 24, 2015 Share Posted February 24, 2015 http://test.xapient.net/phaser/wobbleball/ maybe this helps ? Link to comment Share on other sites More sharing options...
MoragX Posted March 1, 2015 Author Share Posted March 1, 2015 That's exactly what I'm trying to do, thanks! valueerror 1 Link to comment Share on other sites More sharing options...
Recommended Posts