Multiple Dynamic Components w/n a dynamic component

Hello everybody,

I’m brand new to SU and just started using it two days ago to model a project on which I am currently working.

My issue is that I need to be able to click to raise the gangway around the axis of the pin between the barge and the gangway. Then I would like to click and have both the gangway and the bracket on the barge rotate together so that the gangway is on its side and the barge deck bracket is vertical. Then I would like to click and have the gangway swing onto the front of the barge. I have attached a file and have begun the dynamic component process, but I cannot figure out how to make multiple components move together. Is this a question of nested components?

Barge Gangway model.skp (1.4 MB)

Yes.

You indicate 4 animation states (incl. the initial state.)

You can call multiple ANIMATE functions within one ONCLICK on the parent of the nested components.
(Assuming the pin for the gangway is nested within the “Gangway” component. So it moves with it.)

ANIMATE("Gangway!ROTY",-20,0,0,0);ANIMATE("Bracket!ROTY",0,0,0,0);
ANIMATE("Gangway!ROTX",0,0,90,90);ANIMATE("Bracket!ROTX",0,0,90,90);
ANIMATE("Gangway!ROTZ",0,0,0,90);ANIMATE("Bracket!ROTZ",0,0,0,90)

If you also want to force multiple clicks to get back to initial state, add 3 more states to all ANIMATE calls in reverse order, (ie 3rd, 2nd, 1st) as 5th, 6th and 7th.

1 Like

By the way, the rotation will be about the component’s axes located at the origin. (So locate the sub-component’s entities with respect to their origins accordingly.)

Thanks for the tips! Either there is a glitch or I am inputting the values out of order. I have tried many different iterations, but the components still seem to move out of sequence.

Barge Gangway model.skp (1.4 MB)

Yes, I was also getting the same weird behavior.
(And the ANIMATE calls need to be separated by semi-colon not colon.)

Maybe it is better to control the animation with extra attributes. The Onclick function activates two calls : One to set the state, the other to animate:

2 Likes

Thanks for the help guys. I really appreciate it.

I think there might be a glitch when adding multiple dynamic components. I was able to animate the parent component exactly how I wanted it for each individual movement, and even add a few of them together, but for some reason once I added a third or fourth “ANIMATESLOW”, the gangway would no longer follow any of the axis I had set and would move about sporadically.

I couldn’t get it to work with the extra attributes either.

Thanks again.

is this what you require?
Barge Gangway model.skp (557.2 KB)

edit,:-
restricted gangplank to fix size to stop update if hinge pressed when folded

to overcome this behavior, each rotation would need to be in its own group or component, otherwise the comportment will update to its new position, this is similar to why I edited the previous post, the gangplank boundary box would update if the hinge was press whilst in folded position

2 Likes

Yes! This is exactly the motion I needed. Thank you!

I’ve got two questions. First, why did you include the size parameters for the gangway? Second, how does the custom attribute ‘condition’ change from 27.4 to 90 after the second movement?

I see why you added the size parameters now.

there is a conditional formula in that attribute value, you can toggle this view via “=fx” button top right

I had to restrict some of the other parts, as they too were playing up

one can develop this further by using a counter (to act like a time line) , to do this, use animatecustom, so speed can be controlled
basically divide the action up, say 90 for each 90 deg turn, and 50 for the 27.5, each deg equates to a step in count for the 90 deg turn, and bit more for the lowering, 27.4/50, makes each step smaller in this case, hence longer to play. count from state 0 to 250
I didn’t worry about the ease in and out, made them zero, but try them out, or change the time to 6?

Barge Gangway model (3).skp (587.2 KB)

1 Like

@pcmoor @MikeWayzovski @DanRathbun

Thanks guys, you helped me a lot!

And thanks @mlprojects for bringing the subject up!

3 Likes

Hello everyone,

I want to thank you all for your help on the design. This is a picture of the gangway that I got in place today. It’s not quite finished and I have changed the design to a drawbridge setup, but I must say I learned a tremendous amount about dynamic components with your help.

Thanks!

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.