Can't get a Dynamic Component to work. Please help! šŸ˜Ÿ

Hello,

Iā€™m trying to trigger a double ā€œonclickā€ animation within a dynamic component but Iā€™m having trouble understanding relative starting positions and I canā€™t get the script to function properly. I can manage a single onclick without problems but once I put the 2 components into a ā€œmasterā€ component, it seems to become too complex for my brainā€¦
Model in question is a height adjustable electric desk. Iā€™m trying to animate it going upwards from a default starting position of 75cm above ground plane(measured from the surface of the tabletop to (0,0,0) origin point in SU). It should travel 30cm up and stop at 105cm above the origin point.

However thereā€™s also a second moving part, namely the middle legs, which travel 15cm instead of 30.
I have put all the axes of all moving components onto the default origin point of the 3D scene.

The 2 components work as expected on their own while I am inside the master component. However once I exit and try to trigger the animations from the outside, their positions get messed up:

If anyone could have a look or explain what Iā€™m doing wrongly, Iā€™d be very grateful.
I have seen several really complex onclick animations online, but the explanations are never detailed enough to recreate them.

Good morning
I prefer, in the case of multiple animations, to animate a number and that the elements which must transform are based on its value.

In the case of your table, the difference between the two states of the table is 30 cm. So, I decide to animate a ā€œhauteurā€ attribute between 0 and 30.

The mobile part which includes the plate will have its starting height in the low position increased by the value of the animated number.
z=7 + table!hauteur

The telescopic reinforcement tube will have its starting height increased by half the value of the animated number
z=7 + table!hauteur/ 2

1 Like

AnimaƧƵes mĆŗltiplas sĆ£o chatas mesmo!
Exige que seus eixos estejam bem estabelecidos.

Tente explorar a funĆ§Ć£o SET() e mesclar com ANIMATE().

Para animaƧƵes assim vc pode mudar o valor atributos personalizados ao invƩs de mudar X,Y,Z.

Ou atƩ mesmo mesclar com IF()

1 Like