filmov
tv
How to Create a Top Down Movement Character Controller in Unity | Scripting Tutorial
Показать описание
In this video I demonstrate how to create a top-down character controller movement script in Unity which take into account the rotation offset of the main camera. This video also demonstrates how to make a game object rotate towards the mouse cursor on the screen, as is commonly seen in top down shooters. Learn some basic vector and rotation operations along with a simple and practical physics raycast example in Unity.
Technology Used
Unity 3D Engine 2019.3
Git
Visual Studio 2019
.Net Scripting in C#
Everything shown in the video can be downloaded from my Github repository so you can follow along, or reference my approach to creating a top down character controller component.
Time Codes:
00:54 Sample Scene Overview
02:05 Input Handler Script Overview
03:02 Character Movement
06:00 Move Relative to camera rotation
10:38 Rotate Towards Movement Vector
15:03 Follow Mouse Rotation
Broken Knights Games:
► Music Credit: LAKEY INSPIRED
Track Name: "Better Days"
License for commercial use: Creative Commons Attribution 3.0 Unported "Share Alike" (CC BY-SA 3.0) License.
Technology Used
Unity 3D Engine 2019.3
Git
Visual Studio 2019
.Net Scripting in C#
Everything shown in the video can be downloaded from my Github repository so you can follow along, or reference my approach to creating a top down character controller component.
Time Codes:
00:54 Sample Scene Overview
02:05 Input Handler Script Overview
03:02 Character Movement
06:00 Move Relative to camera rotation
10:38 Rotate Towards Movement Vector
15:03 Follow Mouse Rotation
Broken Knights Games:
► Music Credit: LAKEY INSPIRED
Track Name: "Better Days"
License for commercial use: Creative Commons Attribution 3.0 Unported "Share Alike" (CC BY-SA 3.0) License.
Комментарии