
How to make a 3d fight game in Unity - full tutorial
video description
Date: 2022-03-14
Related videos
Comments and reviews: 9
Bud
ABOUT UNITY-
- 3:46 Textures-
- 4:02 Create material-
- 4:11 Ground material-
- 4:28 Albedo (change the material)-
- 4:53 Drag-drop texture-
- 5:18 Shader-
- 7:14, 7:21 Arena to hierarchy-
- 12:07 Add component, character controller-
- 12:46 Reposition-
- 13:02 Radius-
- 13:46 Scripts - gravity-
- 14:23 Apply scripts to an object by drag & drop the script and click apply-
- 14:58 Copy and original object in the unity-
CODING-
- 18:27 Gravity 9.8f-
- 19:12 - 19:24 Awake, onEnable, Start, Update-
- 19:29 Differences between Start & Update-
- 19:34 Why it is better to use Start than Awake-
- 20:18 Adding charController-
- 20:25 Move-
- 20:58 Movement explained-
- 26:38 transform.forward-
- 27:35 Gravity explained-
- 27:50 Why Time.deltaTime?-
- 28:28 Time it takes to go from one fram to the next frame-
TIPS-
- 30:11 If you want the camera to look at a certain way-
- 30:31 Position the view-
- 30:38 Select the main camera-
- 30:41 Mac (Shit+Command+F), Windows (Ctrl+Windows Key+F)-
Rotate-
- 31:22, 31:55 Vector3.zero explained-
- 33:50 Local space, world space-
- 34:43, 35:54 Origin/Local space-
- 35:05 World space is everything around -
- 37:31-39:11 Explanation-
- 39:24 without multiple with Time.deltaTime to smooth it out-
- 40:20 Last time checked continue tomorrow-
- 40:40 CameraFollow-
- 40:57, 41:02 Drag-drop the CameraFollow script to Main Camera-
- 41:16 Start to code-
- 43:10 Tag property-
TIPS-
- 43:59-44:15 Name of the tag should be the same-
Late Update - Camera Follow Player-
- 44:40 Late Update explained-
- 45:37 Fixed Update function called every 0.02/sec-
- 45:53 Late Update will be called after the Update is finished-
- 49:22 Copy Component-
- 49:44 Paste Component Values-
How to make camera follow player in a simple way-
- 51:53 - 52:46 Duplicate the Main Camera, Turn off the first one, rename the camera, remove camera component (with the previous script), drag-drop camera to warrior game object (this method is without any script)-
Making the Animation-
Idle animation-
- 51:22, 54:37 Animator controller-
- 54:54 Drag & drop the animation to animation controller-
- 55:28 Animator (Window, animation, animator)-
- 55:47 Right-click (in animator), create state, empty-
- 56:13 Whare to rename the state-
- 56:36 Where the animation lay (check file type)-
- 57:41 Select the whole animation-
- 58:04 Rig, Animation type - Generic-
- 58:51 Select the animation-
Walk animation-
- 59:44 Create empty state, rename, select the animation-
- 1:00:36 Preview the animation-
Animation-
- 1:01:22 Handle animation via script-
- 1:01:45 Add parameter (click + sign)-
- 1:01:55 Walk (bool)-
- 1:02:07 (x), 1:06:36 Defend (bool)-
- 1:02:14 Choose trigger (Attack 1, Attack 2)-
- 1:02:34 Transition (right click, choose 'Make Transition', point on the animation)-
- 1:03:16 Add conditions-
- 1:03:58 If not walk then idle (walk true), vice versa-
Script-
- 1:07:41 Defend, attack1, attack2, walk-
- 1:14:24 Attach the script to Unity-
- 1:14:16, 1:14:30 Click the warrior (hierarchy), add component, search character animations (our script)-
- 1:15:47 Physics of walking explained-
- When we're moving, the velocity will increase over time (vice versa)-
- 1:18:36, 1:19:03 - 1:19:25 Make sure 'Loop Time' is checked, click Apply-
- 1:20:17, 1:21:11 Settings, 'Has Exit Time' (how much time we'll need to exit the animation), uncheck 'Has Exit Time', set Transition Duration to 0.1-
Player Attack Input-
- 1:26:11 Start to code-
- 1:27:17 Key J (defend), K (Attack)-
- 1:31:00 Float the whole number's included, integer the last number's excluded (BUT this takes some time for the attack1&2 to be executed). To fix this:-
- 1:32:33 We need to fix the transition from idle to attack-
- 1:32:42, 1:32:48 Uncheck the 'Has Exit Time' & change 'Transition Duration' to 0.3-
- 1:32:59 Attack to idle
reply
ABOUT UNITY-
- 3:46 Textures-
- 4:02 Create material-
- 4:11 Ground material-
- 4:28 Albedo (change the material)-
- 4:53 Drag-drop texture-
- 5:18 Shader-
- 7:14, 7:21 Arena to hierarchy-
- 12:07 Add component, character controller-
- 12:46 Reposition-
- 13:02 Radius-
- 13:46 Scripts - gravity-
- 14:23 Apply scripts to an object by drag & drop the script and click apply-
- 14:58 Copy and original object in the unity-
CODING-
- 18:27 Gravity 9.8f-
- 19:12 - 19:24 Awake, onEnable, Start, Update-
- 19:29 Differences between Start & Update-
- 19:34 Why it is better to use Start than Awake-
- 20:18 Adding charController-
- 20:25 Move-
- 20:58 Movement explained-
- 26:38 transform.forward-
- 27:35 Gravity explained-
- 27:50 Why Time.deltaTime?-
- 28:28 Time it takes to go from one fram to the next frame-
TIPS-
- 30:11 If you want the camera to look at a certain way-
- 30:31 Position the view-
- 30:38 Select the main camera-
- 30:41 Mac (Shit+Command+F), Windows (Ctrl+Windows Key+F)-
Rotate-
- 31:22, 31:55 Vector3.zero explained-
- 33:50 Local space, world space-
- 34:43, 35:54 Origin/Local space-
- 35:05 World space is everything around -
- 37:31-39:11 Explanation-
- 39:24 without multiple with Time.deltaTime to smooth it out-
- 40:20 Last time checked continue tomorrow-
- 40:40 CameraFollow-
- 40:57, 41:02 Drag-drop the CameraFollow script to Main Camera-
- 41:16 Start to code-
- 43:10 Tag property-
TIPS-
- 43:59-44:15 Name of the tag should be the same-
Late Update - Camera Follow Player-
- 44:40 Late Update explained-
- 45:37 Fixed Update function called every 0.02/sec-
- 45:53 Late Update will be called after the Update is finished-
- 49:22 Copy Component-
- 49:44 Paste Component Values-
How to make camera follow player in a simple way-
- 51:53 - 52:46 Duplicate the Main Camera, Turn off the first one, rename the camera, remove camera component (with the previous script), drag-drop camera to warrior game object (this method is without any script)-
Making the Animation-
Idle animation-
- 51:22, 54:37 Animator controller-
- 54:54 Drag & drop the animation to animation controller-
- 55:28 Animator (Window, animation, animator)-
- 55:47 Right-click (in animator), create state, empty-
- 56:13 Whare to rename the state-
- 56:36 Where the animation lay (check file type)-
- 57:41 Select the whole animation-
- 58:04 Rig, Animation type - Generic-
- 58:51 Select the animation-
Walk animation-
- 59:44 Create empty state, rename, select the animation-
- 1:00:36 Preview the animation-
Animation-
- 1:01:22 Handle animation via script-
- 1:01:45 Add parameter (click + sign)-
- 1:01:55 Walk (bool)-
- 1:02:07 (x), 1:06:36 Defend (bool)-
- 1:02:14 Choose trigger (Attack 1, Attack 2)-
- 1:02:34 Transition (right click, choose 'Make Transition', point on the animation)-
- 1:03:16 Add conditions-
- 1:03:58 If not walk then idle (walk true), vice versa-
Script-
- 1:07:41 Defend, attack1, attack2, walk-
- 1:14:24 Attach the script to Unity-
- 1:14:16, 1:14:30 Click the warrior (hierarchy), add component, search character animations (our script)-
- 1:15:47 Physics of walking explained-
- When we're moving, the velocity will increase over time (vice versa)-
- 1:18:36, 1:19:03 - 1:19:25 Make sure 'Loop Time' is checked, click Apply-
- 1:20:17, 1:21:11 Settings, 'Has Exit Time' (how much time we'll need to exit the animation), uncheck 'Has Exit Time', set Transition Duration to 0.1-
Player Attack Input-
- 1:26:11 Start to code-
- 1:27:17 Key J (defend), K (Attack)-
- 1:31:00 Float the whole number's included, integer the last number's excluded (BUT this takes some time for the attack1&2 to be executed). To fix this:-
- 1:32:33 We need to fix the transition from idle to attack-
- 1:32:42, 1:32:48 Uncheck the 'Has Exit Time' & change 'Transition Duration' to 0.3-
- 1:32:59 Attack to idle
reply
CHEN
what if we have five or six enemies at the same time ? When player killed the first enemy and start attacking the second one.. (I actually use Destory(gameobject) to destory the first enemy. But Untiy just keep saying something like you have destroyed the anmation type and still want to access to it ..
reply
what if we have five or six enemies at the same time ? When player killed the first enemy and start attacking the second one.. (I actually use Destory(gameobject) to destory the first enemy. But Untiy just keep saying something like you have destroyed the anmation type and still want to access to it ..
reply
Andrew
Thank you for the wonderful tutorial. I was able to follow along and even though I felt like giving up on multiple occasions, I pushed through thanks to your wonderful instructions. I plan to edit it now and play with my own models.
Thank you!
reply
Thank you for the wonderful tutorial. I was able to follow along and even though I felt like giving up on multiple occasions, I pushed through thanks to your wonderful instructions. I plan to edit it now and play with my own models.
Thank you!
reply
Andrew
Incredible tutorial, I really love the deep level of detail and explanations. I will be building this today and will get back to you with my results. (I spent most of my work shift watching this,, don't tell my boss!)
reply
Incredible tutorial, I really love the deep level of detail and explanations. I will be building this today and will get back to you with my results. (I spent most of my work shift watching this,, don't tell my boss!)
reply
The
Do i need graphic card to make unity work on my laptop. I'm windows 10 user.
I've tried unreal game engine but it doesn't work since it require high end grpahic card.
reply
Do i need graphic card to make unity work on my laptop. I'm windows 10 user.
I've tried unreal game engine but it doesn't work since it require high end grpahic card.
reply
surbhi
Someone please help me with level designing in this, how can i spawn different enemies on different levels and keeping this 3d environment same for all scenes.
reply
Someone please help me with level designing in this, how can i spawn different enemies on different levels and keeping this 3d environment same for all scenes.
reply
CHEN
I really love this tutorial !! I really learn a lot! Hope you can make tutorial about a fighting game that is using magical attack!
reply
I really love this tutorial !! I really learn a lot! Hope you can make tutorial about a fighting game that is using magical attack!
reply
Arvin
the way you teach is very professional :) thanks for your willingness to help us. all of the information are clear its awesome.
reply
the way you teach is very professional :) thanks for your willingness to help us. all of the information are clear its awesome.
reply
Khizra
can you please provide me the link of these assets that you have used in the video, like 3d character and its animations.
reply
can you please provide me the link of these assets that you have used in the video, like 3d character and its animations.
reply
Add a review, comment
Other channel videos















