# DIAL: Can a dial spin move an object up and down (using relative movement animation not states)?

Jan 21, 2018

I am trying to make a virtual microscope for my students and want to simulate how turning the focus knob (dial) moves the stage up and down. As the knob turns, I would like the user to see the stage actually move on a motion path from its previous position either up or down. If the user turns the dial to the right - it goes up and left it goes down - all from the position it is at. I think I could do this using states but I would rather have the user see the motion. Is this possible? And, if so, how? As always - thank you kindly for your help.

###### 11 Replies

See attached a rough example for how this might be done.

If you do change your mind about using states, this thread here provides an example for that option as well.

Many good wishes being sent your way! That is EXACTLY what I needed - I did not know/see the past value possibility! Thank you, thank you, thank you for responding so quickly!

Michael, this is really cool. So, essentially, you set a dial with X number of points and created a number variable called PastValue; set the variable to always equal dial number; created the rectangle and made two animation paths (up & down); and then set a trigger that activated the motion paths to correspond with the PastValue variable?

What other uses does PastValue have? It seems like an interesting variable to use. Is it strictly for motion paths? Thanks! This is a learning opportunity for me :)

Correct. The important thing here is the SEQUENCE/ORDER of the triggers. The past value needs  to be set first, otherwise past and current value will always be the same and the animations won't be triggered.

Hi Michael, I've happened upon this thread and it is really useful!

I'm trying to replicate the movement of a slide on a microscope with it moving up/down and side to side. I've managed to get the up/down working, but can only do this if the motion path is extended with a finish point. I see in your example, the start and finish of the motion paths are in the same place. How did you get the object to move along a path where the finish is not set? I can't seem to get this to work in the same way, so must be missing a setting somewhere.

Another query, is it possible to have a left/right movement in combination with this? I was thinking to do this I will need to use values and 'if' statements, but can't figure out how to get it moving in a left/right motion with a random start point, set by the previous up/down if that makes sense.

Make sure that the Relative Start Point path option is selected for each motionpath. For left/right motion I would think you need to add a second dial and horizontal motionpaths.

See attached a quick example that has both vertical and horizontal movement. Hope that helps.

Thank you so much for your quick response Michael. I really appreciate the help! I can't quite seem to get mine working from scratch even with setting the relative start point and checking the triggers, but I have been able to adapt from your example what I need.

Thanks again

If you get stuck again, you can always share your .story file here and someone will take a look.

Perfect - that is again helpful! Thank you, Michael.