LDraw.org Discussion Forums
how can i find Dynamic parts animation script? - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: how can i find Dynamic parts animation script? (/thread-24123.html)



how can i find Dynamic parts animation script? - Shi.Yan - 2020-07-19

i can not find it. i want to make a chain animation. Sad


RE: how can i find Dynamic parts animation script? - Roland Melkert - 2020-07-22

(2020-07-19, 16:49)Shi.Yan Wrote: i can not find it. i want to make a chain animation. Sad

Hello Shi Yan,

I think you also mailed me, I'll answer here as it might be useful to other people too.

Animating chain links is a lot more work then doing pistons (like in your gif) etc. as there are many more variables to take into account.

The easiest (most robust) way is to calculate the position and rotation of each link in the chain while they move a single link.

You can then just repeat the pattern as optical illusion will make it seem the links go round the whole chain.

In practice this means you'll be using a modulo on the frameTime variable.

You might also consider doing a 'stop animation' by just recording the links posOri while manually moving them in the model. You could do that by looping the references in the model and adding the matrices to a string which you finally put on the clipboard.

Then in the full script paste those values into a constant array.