Загрузка...

Genshin Impact Movement in Unity | #18 - Camera Horizontal Recentering

In this video we'll be adding the last feature of our Player Camera: Horizontal Recentering.

This feature simply automatically Horizontally Recenters the Camera at a given speed, which also makes it so that the Player moves in a circular motion when enabled.

________________________________________________________

Timestamps:

00:00 What feature was missing in the Camera?
02:19 How will we save the settings values?
03:01 Creating the Recentering Data Script
05:06 Creating the Recentering Data Lists
05:54 Setting the Recentering Data Values
07:05 Adding default values in the Virtual Camera
07:34 Creating the Player Camera Utility Script
08:20 Updating the Player Camera Utility Script
12:27 Adding the Player Camera Utility to the Player Script
13:14 Referencing the Virtual Camera in the Inspector
13:32 Creating the Reusable Enable and Disable Camera Recentering Methods
15:12 Creating the Update Camera Recentering State Method
15:44 Creating the On Movement Canceled Method
16:52 Checking for No Movement
17:09 Checking for Forwards Movement
17:34 Checking for Backwards Movement
20:49 Creating the Set Camera Recentering State Method
21:55 Checking for Sideways Movement
22:30 Calling in the Update Camera Recentering State Method
25:53 First Problem: Different Speeds have different Rotations even with the same Settings
29:36 Second Problem: Recentering State isn't Updated when Changing States
32:20 Third Problem: Recentering State isn't Updated when Entering or Exiting Slopes
33:56 Fourth Problem: Recentering Stops when Movement is Canceled on Jump
37:49 Fifth Problem: Walking & Idling States have a different Recentering Time when looking Down

________________________________________________________

Useful Links:

● GitHub Repository: https://github.com/Wafflus/unity-genshin-impact-movement-system
● Tutorial Series (Youtube Link): https://www.youtube.com/watch?v=-HCv142Uqhk&list=PL0yxB6cCkoWKuPoh_9dSvdItQENVx7YTW
● New Input System (Unity Documentation): https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/QuickStartGuide.html
● Cinemachine (Unity Documentation): https://docs.unity3d.com/Packages/com.unity.cinemachine@2.8/manual/index.html
● Virtual Camera (Unity Documentation): https://docs.unity3d.com/Packages/com.unity.cinemachine@2.3/manual/CinemachineVirtualCamera.html
● POV Aim (Unity Documentation): https://docs.unity3d.com/Packages/com.unity.cinemachine@2.3/manual/CinemachineAimPOV.html
● Animation Curves (Unity Documentation): https://docs.unity3d.com/Manual/animeditor-AnimationCurves.html
● Cancel Recentering (Unity Documentation): https://docs.unity3d.com/Packages/com.unity.cinemachine@2.1/api/Cinemachine.AxisState.Recentering.html#methods
● Header Attribute (Unity Documentation): https://docs.unity3d.com/ScriptReference/HeaderAttribute.html
● Vector2 (Unity Documentation): https://docs.unity3d.com/ScriptReference/Vector2.html
● Transform Euler Angles (Unity Documentation): https://docs.unity3d.com/ScriptReference/Transform-eulerAngles.html
● Mathf.Abs (Unity Documentation): https://docs.unity3d.com/ScriptReference/Mathf.Abs.html
● foreach (C# Documentation): https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/statements/iteration-statements#the-foreach-statement
● Serializable (Unity Documentation): https://docs.unity3d.com/ScriptReference/Serializable.html
● SerializeField (Unity Documentation): https://docs.unity3d.com/ScriptReference/SerializeField.html
● Properties (C# Documentation): https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties
● Rule of 3: Direct and Inverse (Smartick Website): https://www.smartick.com/blog/math/rule-of-3/

________________________________________________________

● Subscribe: https://www.youtube.com/c/IndieWafflus?sub_confirmation=1

● Follow me on Twitter: https://twitter.com/IndieWafflus

________________________________________________________

Видео Genshin Impact Movement in Unity | #18 - Camera Horizontal Recentering канала Indie Wafflus
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять