How to exactly interpret AnimateCustom(exact explanation of its values)?

How would one go about getting a DC (dynamic component) to rotate about Z from 0 to 45 degrees as follows:

  • total time 20 seconds
  • first 5 seconds accelerating from 0 to max speed
  • last 5 seconds decelerating from max speed to 0
  • the 10 seconds in between with constant max speed.
  • again, total time is 20 seconds.
    As it is now with only one AnimateCustom(…) the animation gets hichups between transitions at around 5 and at around 15 seconds from the start.

Post your component, easier to help that way.

Thanks for responding.
On my mobile phone so trying to remember that line, attribute → action is:
OnClick → AnimateCustom(“RotZ”,20,25,25,0,45)

Apply this to a component making it a DC.

OnClick starts the animation about the Z axis using:

  • 20 for duration in seconds
  • 25 and 25 as percentage of 20 seconds for easein and easeout, meaning about 5 seconds for both
  • rotation from 0 to 45 degrees (and back)

Point is that this solution results in hickups in speed transition.
Maybe a chain sequence of AnimatieCustom actions would do the trick. But how?

OK so a bit of reading about ease in and out. It works on a scale from 0 to 100, 0 being fastest. You need to play with the ease in and ease out number to get your 5 sec on either side.

Formula: AnimateCustom(“attribute”, total time, ease-in, ease-out, start value, end value)

So, try: AnimateCustom(“RotZ”,20,100,100,0,45)

Animate Custom and Animate reading here: https://help.sketchup.com/en/sketchup/dynamic-components-onclick-function-examples

Thanks again for responding.
I’ve already tried your example. Unfortunately it completely eliminates the constant speed between EaseIn and Easeout. And that is what I need:
0->certain speed(x) — speed(x) — certain speed(x)->0

With values much lower than 100 the transition is not smooth.

I’ll show/share (later) a simplyfied model of what I want to rotate, taken from a larger model I have been working with.

1 Like

Hmm, it looks smooth on my machine. I really don’t know a ton about onclick and animate, perhaps @pcmoor Philip can help?