Symbols, Timeline Action and Physics


(Carolyn) #1

I have a symbol that is comprised of two elements.

The two elements need to be superimposed. One will initially be visible, but when clicked, it will disappear and the other will be seen.

I want to apply Physics, so that the symbol enters the scene and drops through it.

When it disappears at the bottom, I’d like it to begin again from the start of the timeline.

Having physics on the two bodies within the symbol means they interact with each other and are side by side instead of being superimposed. However, if the symbol is set up this way, there is no problem with setting a symbol timeline action (Go to time in timeline, time: 0) to reset it to the top of the scene after it drops through the bottom. I do need to set the Origin keyframes for this within the symbol.

Applying the physics to the symbol itself, rather than to the elements within, keeps the elements superimposed, but makes the symbol timeline keyframe action be ignored. The Origin keyframes are set, it is given the same action that worked in the scenario above.

Am I missing something? Is this a bug or expected behaviour? Any idea of how to set symbol timeline keyframes with a physics behaviour assigned?

Thanks,
C

TimelineTest.zip (16.2 KB)


(Carolyn) #2

Ok, so I guess what’s going on is that the timeline within the symbol doesn’t know that things have changed when the physics is applied to the outside. So in this case, I should just created an animated transition within the symbol so that its timeline keyframe knows where to reset.


#3

A symbol’s elements are in their own universe with its own gravity, so physics properties applied to a Symbol (without entering the symbol first) are not applied to elements within that symbol. It is more akin to applying dynamic physics to a group: its effects appear to apply to the elements within the group, but the child elements are just doing what their parents tell them to do.

For your use case, it seems like you are creating a pretty predictable movement that may not need physics: you could likely do this same thing with a regular timeline, which would also give you better visibility into the moment when the element leaves the view. When using physics, it’s a bit tricker to detect when an element has exited the scene area, though still possible using the hypeDocument.getElementProperty(element, propertyName) API function.


(Carolyn) #4

Thanks, been wrapping my head around this, so makes sense. In this case, it would have been quicker to have just been able to toggle on the physics, but I can get by without it.