[MUSIC] Here is our little virtual reality scene that we've been creating throughout the specialization. And it's time to add a little bit of movement to it. And in particular, we've got this kind of creepy closed circuit TV camera that's kind of watching how we're doing. Let's have a look at that in the actual, there it is. Now what I want to do is make it move, give it a bit of life. So the first thing we need to do is go to assets and create an animation and we're going to call it camera scan, maybe. So this is our animation and we can open it, actually already open, but if you go to the window and open the animation window we can see this view which will allow us in a minute to start animating. I'm not going to do anything with it yet. Because before I want to do anything with it, we need to add it to the CCTV camera itself, the closed circuit camera itself. And for that, we need another asset, which is called an animator controller. So if the animation provides one clip of animation, the animator controller allows you to combine different animations onto a single object. And what I'm going to do is select the CCTV and add an animator. To that object. And this needs a controller, which was the controller that we just created, camera animator. And I'm going to open, go Windows, Animator, and this is what it looks like. So these are basically, there are three what are called states. And states mostly correspond to an animation but these are actual special states. Entry and exit. So entry is what happens when the program begins, exit means if you reach that exit state, you end. So basically what we want to do is go to entry and then we want to move straight away into our animation, because we want to do that all the time. So let's just grab our animation, camera scan, and put it in here. And it'll automatically make it orange, which means the default state, which means that there's little entry to camera scan, which means when we start, it will start off camera scan. But that's great. We've got something, but we don't actually have any animation left, it's not actually doing anything. And this is where the animator window comes in. We're now going to use the animation window to start animating this object. Now I could do add property, which will define what bits of the object we're actually going to animate, what aspects. And in this case we're mostly going to be animating transforms. But actually what I'm going to do is hit record and then anything I do to the object will just be recorded as part of the animation. So I'm going to animate the transform of the CCTV, the main object, and I'm basically just going to animate the rotation. So I'm going to grab it, and you see if I move it, it will set a key frame at frame zero, which is kind of what I want. I want it to start at frame zero, but I don't actually kind of want it started in the same position. So you see I've kind of moved it a tiny bit, but not actually really moved it. I've just done a little movement inside the key frame. Now what I'm going to do, is I'm going to select that key frame, and copy it. I'm just going to do control-c. And move to one second, and copy that in, why have I done that? Well, I actually want the same frame to exist at both zero second and one second, so it starts and ends in the same place, so we can loop it. So we can be sure that the end of the animation is identical to the start of animation. So whenever I want to loop an animation, I take the first frame, the frame at zero seconds, and copy that straight to the last frame. That's the first thing I do. And then I create the stuff in the middle. So in the middle, it's about 30 seconds, I want it to turn this way. And there we have a basic animation. Oops, that's not what I want. Let's go back here. Delete that key frame again, let's do that. Shows the pitfalls of animation. Let's try again, slightly smaller. And there we go, it's moving quite sensibly. Actually, you know what? That's a little bit quick for me. I would like this to be a little bit slower. So what I'm going to do is I'm just going to move this. Final frame, key frame to two seconds, and from 30 to one second. And there we go, that's a bit nicer. And all we can see here, the great thing is, we just have three key frames. Two of them which are identical. And we're already creating quite a nice movement. So If we wanted sort of a more complex movement, obviously we would need more key frames than that. But actually it's quite nice as it is. So I'm going to turn record off and hit play and we can see in VR that we've got this animating object. Let's look at that again quickly, now it's not quite what I want because it's just done one movement, it's done the movement once. What's the problem with that? Well, it's not a big problem. If I go to the animator, go to camera scan, I can just double click on this movement and all I need to do is loop time and what loop time means is the animation loops. It goes back to the beginning and starts again. Once, once it's ended, and that's really all you need to do to create an animation. Obviously, you'll create a lot more key frames if you'd like, something more complex and you can also, I've just animated one particular property, the rotation. You could animate lots of other stuff. For example, I could've animated some objects independently of the main object but I think it's a good starting point to start with just a simple animation like a rotation or maybe a position. And that can add a lot of interest and movement to your scene. [MUSIC]