# Is there a way to create a pause between movements in Animation Nodes?

I want to create a translation or a rotation, but with pauses every custom number of frames (Preferable with an interpolation) , like in the GIF. How can I do this?

• can you mark one answer as the correct answer, or say why your question isn't solved yet? – Jacques Lucke Apr 12 '16 at 16:23

## 4 Answers

I'm sure there are many ways to create this effect but here is one relatively simple one:

The essential node here is Mix Euler List. For translation you could use the Mix Vector List node.

The Mix Euler List node takes a list of vectors and a value between 0 and 1 (can be higher when Repeat is enabled). If the factor is 0 it will output the first element, if it's one it will output the last one. All values inbetween will result in an interpolated output. (eg. 0.1 will be something between 0° and 90° in the z-axis).

The downside of this approach is that the time intervalls are always the same, but it seems to work in your case. You can animate the time somehow to change the intervalls using the same approach but this can become messy very quickly so I didn't do it here.

• A very cheap way to show the pause longer is to add the value twice or more in a row in the Create Euler List. – clankill3r Apr 11 '16 at 20:42
• Do you think we should expose those Mix XX List nodes to menu? – Leon Cheung Apr 11 '16 at 23:43
• Not sure if its worth it to create another 6 menu entries or so... – Jacques Lucke Apr 12 '16 at 8:30
• True, but even for me, I actually didn't know these nodes until seeing this answer (shame on me.. :P). So my concern is: Whether or not should we create something without being found by most ppl... As for this specific one, maybe a new "List -> Mix" category is a workround for that. – Leon Cheung Apr 13 '16 at 2:12

Here is a way to achieve this which is easy to adjust. I've separated the parameters as inputs to a group subprogram.

It uses div/mod on the timestep to figure out the whole divisor and remainder portion of the timestep divided by "segment duration". It applies whole segments by multiplying by the supplied "segment rotation", and then applies an interpolation curve to the progress through the current rotation.

This could be adjusted to use a matrix instead of a rotation, allowing a more complex periodic motion to be applied, with pauses between intervals.

Here is another way:

NOTE: The setup above is for equidifferent result. Actually you can use different Delay, Rotation Increment, Interpolation and/or Duration value by adding new iterator(s) to the same loop, then use list(s) of same length to the iteration amount, for more variations.

• what is "reassign loop paramater"? I can't find it. Is it depreciated? – David Jeske Jun 6 '16 at 18:03
• @DavidJeske the Reassign button can be found in the Advanced Node Settings panel for each Loop Input node with parameter created. See here. – Leon Cheung Jun 7 '16 at 7:18

For the purpose of learning I tried to create another way of doing this. (I also learned time goes really fast doing this :) )

First create an Empty and animate one sequence to your liking using the F-Curve editor. I let the nodetrees speak for itself.

Make sure to set Evaluate F-Curve to Absolute, else it won't repeat.

Make sure to set 'Allow negative index' on the [Get list Element] node.

Although you could animate the sequence on the target object if you like. I do not recommend this! It will make swapping to a different rotation much harder. Now you could even make an List of Objects and select the object to use depending on the frame for example.

• good idea. There are two things you can improve in that node tree: 1. use the Combine Euler node instead of Combine Vector. This way you don't need the Vector to Euler node. 2. To get the last element of a list you can use the Index -1. make sure that you enabled Allow Negative Index first (in the advanced settings). – Jacques Lucke Apr 12 '16 at 8:28
• @JacquesLucke Thanks for pointing that out. I updated the images. – clankill3r Apr 12 '16 at 20:29