Releasing an object to fall by gravity

I'm making a web app involving leaves on branches linked to sounds. You click the leaf and the audio plays.

What I'd also like to do is make the leaf fall gently to the ground when clicked so my question is this:

How can I trigger it to fall ?

I'm thinking there must be a simple answer. Ideas anyone ?

You should be able to use physics properties on timeline keyframes. ( you can use record when changing the properties in the physics inspector )

So on click would start a timeline with the keyframe

Example symbol using this.

( The symbols are duplicated, added to scene then the leaf's orientation is changed within the symbol.

This allows for the gravity to work in the correct direction. )

physics start.hype.zip (832.2 KB)

1 Like

This sounds like the Coconut template.

https://photics.com/free-template-tuesday-1-tumult-hype-coconut/

If I had to animate leaves falling off a tree, I might not even use Physics. Basically, on click... or mouseover... or related event... then play animation. The animation is similar to the "Fishy" template. The bubbles zig-zag upwards. With the leaves, they could zig-zag downwards.

https://photics.com/free-template-tuesday-15-tumult-hype-fishy/

1 Like

Just answering the question... rather than being about the actual animation.

I think for animating leaves, they need to be floaty as they fall down. That's tough to do with Physics. I don't know how you'd do it without coding.

Loads of food for thought here - thanks so much for replying.
I am going to try something like the fishy bubbles exaqmple and try to make make them twist and turn, float down gently and lie flat on the 'ground'.
Like many things it just needs to be believable, not hyper-realistic.
When I get something half decent - I'll post it here

physics start.hype 2.zip (822.1 KB)

2 Likes

Nice,

I was just actually revisiting

https://forums.tumult.com/t/physics-api-but-no-hittest-collision/11415.

To remind myself of using the API. ( But got side tracked with trying out multiple constraints ..)

Partly because of the little issue I ran into with the above example and symbols. The grass is not part of the symbols so the leafs physics ignore it..

As also shown in the nice example you have done.