If you move the player character you should see it moving forward and back in the same way that we’d expect it to but the camera doesn’t really help us change the direction that the player would be facing. The second thing that you may find to be troubling is that the player moves independently of the camera. (These are my settings below, but feel free to experiment with what feels good to you.) If you increase the height of all three of the rigs, you could even create a top-down view.) We can change the width and height of the individual rigs by heading to the Orbits section within the Inpsector window of the Freelook camera. I find that wider rigs works for me with medium height. You can customise this as you wish for your own feel. (The way you set up the rigs will determine the angle and view that your player will have of your game. So let’s widen those rigs to give us a better view of the player. The top rig represents the view when your mouse has moved the camera to focus on the top of the player character while the bottom rig represents the lowest possible view of the player character that you may have. Those rings or rigs (as you’ll see them named in the Inspector window) confine the movement of the camera around the player. You may notice that the player now has three red rings floating around it. Make sure you scene view window is open and select the Freelook camera. Next, using the Cinemachine dropdown, we’re going to create a Freelook Camera. (See gif below for process and picture to the right of the Unity Editor after the Cinemachine package has been installed.) Setting up our Freelook Camera: Once the install has completed, you should see a Cinemachine dropdown at the top of your Unity Editor. Click the Install button on the bottom right of the Package Manager window and that’s it. Once the Package Manager window is open, make sure that you are in the Unity Registry and scroll down the list of packages for the Cinemachine package. At the top of the Unity Editor, use the dropdown to access Window > Package Manager. Installing Cinemachine:Ĭinemachine will have to be added to our Unity project but that’s going to be really easy to do. It’s very powerful but also very easy to use. Cinemachine is an Emmy Award winning package which has been used in film, tv as well as games. Unity has a package called Cinemachine which can help us out with that. So how do we achieve all of this? Well luckily for us, Unity makes that really easy to do. In fact, we want the camera to follow the player, we want the camera to have the ability to rotate around the player and lastly, we want the player to be able to move in the direction that the camera is pointing to. Now that we have a player character that is able to move and jump, we’re going to have to work on the game camera because as you may have noticed, when we jump or move too far, the player moves out of the view of the camera.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |