how to slowly increase the size of a physics body ?

Hi everyone, I am trying to make a mushroom game where after I touch one mushroom, the physics body will slowly becomes bigger. For example I have 10 mushrooms, and if I touch any one of them, it will grow from radius=50 to radius=100 in 2 sec. I know the transition tools can’t do it, any idea how to make it happen??
thanks [import]uid: 38556 topic_id: 12004 reply_id: 312004[/import]

You can’t scale physics bodies individually. You can however put them in a display group and scale the display group. [import]uid: 27965 topic_id: 12004 reply_id: 43797[/import]

I am thinking to assign a timer to each object, in the timer function I will remove the previous physics body and create a larger one. However, I am not sure how to assign a timer event to an object. Anyway I can call a timer event like the following but use “timer” instead of “touch” ??

object:addEventListener(“touch”, function(event) chopFruit(object) end)
[import]uid: 38556 topic_id: 12004 reply_id: 43969[/import]

I tried this and only the display objects (the graphics) in the group get scaled while the physics body do not change at all. Could you kindly provide a sample code if you manage to get it working? Thanks! [import]uid: 48742 topic_id: 12004 reply_id: 45393[/import]

no, I have no idea how to get this works too… I wonder if i can use a timer to do it? but how can I assign a timer for each object? [import]uid: 38556 topic_id: 12004 reply_id: 45426[/import]

I currently have items that shrink over time. So far I have just used a radius for the physics that is somewhere in the middle of the size range. The only other thought I have is to create rectangles of a few different sizes, and use them for physics.

The actual image would not be used for physics, and each box would need to be set at the same center point. So, if you had an image that started at 100x100, and shrank to 20x20, you might have rectangles of size 100,80,60,40,20. When the image shrank to 90, you would push the 100 box off screen. Then you would be hit testing on the 80 box. When the image got to 70, you would push the 80 box off screen, and be testing with the 60 box etc.

This seems kind of clunky, but with no way to scale the collision box to match the image, I am not sure what else there is. Anyone else have a better idea?

[import]uid: 41667 topic_id: 12004 reply_id: 46031[/import]