Have an Image of a Tree. Need to animate a little

Hi guys I have a Tree and would like to animate with a very simple SWAY of some of the branches / Leaves. I know id have to try and make sections of it into physics but not sure, any ideas for some quick help? [import]uid: 130366 topic_id: 33827 reply_id: 333827[/import]

Hello,
Another option is to compose the tree of several parts, with the “core” of the tree being one image and the animated parts being separate sprites. You could control the different parts individually by adding references to the animated parts to a holding table like treeParts = { leaf1=[object], leaf2=[object] }… then you could tell Corona to animate those parts individually, or pause them, or stop everything.

Physics is still an option, but if the animation is minor, I think it’s alot of trouble to assemble a tree from a bunch of physical objects and attach them by joints.

Brent
[import]uid: 200026 topic_id: 33827 reply_id: 134503[/import]

Hello,
Another option is to compose the tree of several parts, with the “core” of the tree being one image and the animated parts being separate sprites. You could control the different parts individually by adding references to the animated parts to a holding table like treeParts = { leaf1=[object], leaf2=[object] }… then you could tell Corona to animate those parts individually, or pause them, or stop everything.

Physics is still an option, but if the animation is minor, I think it’s alot of trouble to assemble a tree from a bunch of physical objects and attach them by joints.

Brent
[import]uid: 200026 topic_id: 33827 reply_id: 134503[/import]

Thanks, really appreciate it! will try it out and post back, not too sure what you mean, but i think i have a vague idea of what your saying.

Building on that, Suppose I take the tree Image, and then create the sprites for some of the leaves, and then get it into corona.

Now if I want to Attach a physics object to the end of an animated leaf, would this be possible, i.e., after animating can you define the leaf as a physics object upon contact with another physics object. If im not being clear, heres an example scenario :

tree on screen is swaying / leaves slowly rustling through some leaf animations. User then selects a christmas decoration from a widget, and then moves the christmas decoration to one of the leaves to “Attach / Hang” it. upon collision / joint is created …well, the point of this whole exercise is to create the view that the christmas decoration is "hanging from the tree leaf…

I can see why this wud get tricky, as if you attach the ball to the animated leaf using a joint (after changing the leaf to a physics object on contact) this means the leaf would have to have a joint to be anchored to the tree?.. is there no other simpler way?

[import]uid: 130366 topic_id: 33827 reply_id: 134770[/import]

Thanks, really appreciate it! will try it out and post back, not too sure what you mean, but i think i have a vague idea of what your saying.

Building on that, Suppose I take the tree Image, and then create the sprites for some of the leaves, and then get it into corona.

Now if I want to Attach a physics object to the end of an animated leaf, would this be possible, i.e., after animating can you define the leaf as a physics object upon contact with another physics object. If im not being clear, heres an example scenario :

tree on screen is swaying / leaves slowly rustling through some leaf animations. User then selects a christmas decoration from a widget, and then moves the christmas decoration to one of the leaves to “Attach / Hang” it. upon collision / joint is created …well, the point of this whole exercise is to create the view that the christmas decoration is "hanging from the tree leaf…

I can see why this wud get tricky, as if you attach the ball to the animated leaf using a joint (after changing the leaf to a physics object on contact) this means the leaf would have to have a joint to be anchored to the tree?.. is there no other simpler way?

[import]uid: 130366 topic_id: 33827 reply_id: 134770[/import]