Hi guys in this lecture we are going to do the inverse of the previous lecture in the previous lecture.
We controlled the rotation through position.
It was easy by the way in this lecture.
We wanted to control the position through the rotation.
If you come to the demo over here and I play it you will notice that the needle is just wiggling every
one second by 150 plus or minus.
So now it's going negative and positive and the ball is following the needle.
Obviously since this is already fixed.
So how are we going to control the position of the ball through the rotation.
Of course using expressions.
Let's go to speed here which is a composition that does not have any animation at all.
Let's look at the needle and let's give it the wiggle.
So I would open a rotation press alt or option click on the stopwatch and I have the expression out
right.
We kill every one second.
One hundred fifty plus or minus that will be cool I think.
So let's try it.
Well it's working.
It's almost going to the maximum over here and to the minimum three.
Let's go to market now and decide exactly the values of the market the open position.
If you remember we need the minimum value and the maximum value.
I would stop the animation Let's bring the timeline over here we can see.
So the minimum value here is let's take it to the border here is almost 200 Let's take 200 for just
simplicity and the maximum value is going to be around 1035 1000 will be OK.
So we have $201 could start the expression we press alt or option and click on the stopwatch restudy
expression.
Of course now I'm going to use interpellation and I'm going to take linear the long while if you like
and then I'll click on it.
Let's start adjusting the parameters.
What is the G.
Is the rotation.
This is the values that you are studying.
So I can write here the whole expression I'll just use the pick me up click and take it to rotation.
So now we have the rotation here.
What is the minimum rotation.
We know very well that the wiggle is 150 so it could be minus 150.
Now if this is too much or too little I just added the maximum value here will be plus 150 are like
150.
And what are the values I want for the exposition here for minus 150.
We agree on having 200.
So I write to 100 and for the maximum 150 out of 1000.
Very easy.
Ok now this is not or not is that I want to control only the x.
I don't want to touch the Y and I wanted to go up and down fine.
So let's say this expression will give me the x value so I'll write X and I will write the semicolon
here I'll type it.
Press Enter now I need to return to values for the position like the rotation rate and one value.
Here we want to return to values.
So the first value is x.
So you open the bracket and you write x.
The second value doesn't change.
This is the Y.
So I can write an expression and you know do a lot of things.
The easiest thing is to take the pick me up and drop it on the Y.
Here you are.
So it says transform position 1.
So actually whatever the position one is now it's going to be over here and X will come from the linear
expression here.
Did it work.
Am I good enough.
Let's see.
Click out no mistake.
OK that's pretty good.
No error message.
I will play.
Here you are.
It's working at 100 percent.
So actually it's pretty easy to work with the expressions provided that you go step by step and do that
I think.
Cool guys now the student that went in 3D and he had a lot of complication because it was the three
values.
Let's go to 3-D and see exactly how it works.
And of course we can put the needle into 3D can put everything in 3-D.
But I will focus now not even in 3-D The animation is still working.
I did not even return the zero value but to make it consistent I can come to the position here and write
karma bequeaths and use the pick me up to take the Zed's value.
Here you are I click outside and I think it's working is it.
Yes.
So we are already an active camera.
That's how it works.
Notice what's happening here.
I am using only the z rotation.
If I were using the x and y rotation of course it would be much more complicated.
Now as you know before jumping to 3D please Master 2D and then jump to 3D because here you have three
values longer expressions more complicated rotations and even the position here will be at the three
if you perceive B.
You have three of them.
So maybe you want to go step by step master to D and then move on to 3-D.
Thank you very much for listening.
I will see you in the next lecture and I hope you do lots of speedometers.