Physics objects as movieclip 'frames'?

Hi all, I’ll try to keep the waffle to a minimum.

Example scenario: I have an animated balloon (when I say animated, I mean ‘frame-by-frame’) that inflates/deflates on a continuous loop.

I would like it to interact with other dynamic physics objects, so I’d like to know how I would add different (sized) physics shapes to each frame, for example:

local balloon = movieclip.newAnim( { “balloonInflatedabit.png”, “balloonInflatedabitmore.png” etc etc

I know I can use sprite helper (and other editors) to add physics shapes to animation frames, but I would like to know how to achieve this in it’s simplest form, ie; without sprite-sheets.

Anyone?

Thanks

[import]uid: 176868 topic_id: 35275 reply_id: 335275[/import]

Hi @markr1,

About how many frames are you going to use? Less than 10, or far more? 20? 30?

One solution for the physics interaction would be to add multiple body parts (of different sizes, matching the balloon frame sizes), and use PhysicsContact to selectively “turn on” only the part that coincides with the current balloon size when something collides with it. I wrote a tutorial about this method here which you might find useful:
http://www.coronalabs.com/blog/2013/01/08/working-with-multi-element-physics-bodies/

Best regards,
Brent
[import]uid: 200026 topic_id: 35275 reply_id: 140232[/import]

Hi @markr1,

About how many frames are you going to use? Less than 10, or far more? 20? 30?

One solution for the physics interaction would be to add multiple body parts (of different sizes, matching the balloon frame sizes), and use PhysicsContact to selectively “turn on” only the part that coincides with the current balloon size when something collides with it. I wrote a tutorial about this method here which you might find useful:
http://www.coronalabs.com/blog/2013/01/08/working-with-multi-element-physics-bodies/

Best regards,
Brent
[import]uid: 200026 topic_id: 35275 reply_id: 140232[/import]