How to Change Cinemachine Values Through Code Dynamically

Uploaded by samyam
Share: Twitter Facebook
➡️➡️➡️UNITY NEW YEARS SALE ⬅️⬅️⬅️
https://assetstore.unity.com/?aid=1101ljAbS
⏱️ December 12 2021 21:00 PT - January 8 2022 23:59 PT ⏱️
Use custom code SAMYAMNY22 at checkout for an extra 10% off orders over $150
(Coupon Code expires EOY (end of year))

Thanks to Unity for sponsoring this video!

? Get the Source Code ?
https://www.patreon.com/posts/59874572/

? Support Me ?
Patreon: https://www.patreon.com/samyg
Donate: https://ko-fi.com/samyam

►? Relevant Video Links ?
ᐅCinemachine Brain Documentation
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.1/api/Cinemachine.CinemachineBrain.html
ᐅCinemachine Virtual Camera Documentation
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.1/api/Cinemachine.CinemachineVirtualCamera.html
ᐅCinemachine Free Look Camera Documentation
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.1/api/Cinemachine.CinemachineFreeLook.html
ᐅCinemachine First Person Controller w/ Input System - Unity Tutorial (I show how to make a Cinemachine Extension here)
https://youtu.be/5n_hmqHdijM
ᐅCinemachineExtension Documentation
https://docs.unity3d.com/Packages/com.unity.cinemachine@2.1/api/Cinemachine.CinemachineExtension.html
ᐅUnity Forum: Cinemachine Custom extension with axis recentering
https://forum.unity.com/threads/custom-extension-with-axis-recenterin.778214/
ᐅHow to Blend/Switch Between Cinemachine Cameras - Unity Tutorial
https://youtu.be/Ri8PEbD4w8A

►Assets shown in this video:
ᐅGaia Pro 2021 - Terrain & Scene Generator
https://assetstore.unity.com/packages/tools/terrain/gaia-pro-2021-terrain-scene-generator-193476?aid=1101ljAbS
ᐅUltimate VFX
https://assetstore.unity.com/packages/vfx/particles/ultimate-vfx-26701?aid=1101ljAbS
ᐅSci-Fi Effects
https://assetstore.unity.com/packages/vfx/particles/sci-fi-effects-20416?aid=1101ljAbS
ᐅTopDown Engine
https://assetstore.unity.com/packages/templates/systems/topdown-engine-89636?aid=1101ljAbS
ᐅEasy Character Movement 2
https://assetstore.unity.com/packages/tools/physics/easy-character-movement-2-193614?aid=1101ljAbS
ᐅCover Rifle Animset Pro
https://assetstore.unity.com/packages/3d/animations/cover-rifle-animset-pro-23360?aid=1101ljAbS
ᐅMega Shapes
https://assetstore.unity.com/packages/tools/modeling/mega-shapes-3640?aid=1101ljAbS
ᐅProcedural Generation Grid (Beta)
https://assetstore.unity.com/packages/tools/utilities/procedural-generation-grid-beta-195535?aid=1101ljAbS
ᐅPlaymaker
https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-368?aid=1101ljAbS

This video shows how to change Cinemachine properties in code dynamically. I go over the two main cameras CinemachineVirtualCamera and the CinemachineFreeLookCamera. We will add a CinemachineBrain first dynamically through code to the main camera. The Cinemachine Brain communicates between the virtual and actual camera. Then we add a virtual camera through code and assign a Follow and Look At property. We can also change the priority of the camera through code, which determines which camera is shown (which one takes precedence). Then I show how to add and get cinemachine components through code, including Transposer, Composer, and noise. Finally I go over adding Cinemachine extensions through code, briefly highlight custom cinemachine extensions, and touch upon using and changing the CinemachineInputProvider which is used to replace the old input system values with unity's new input system.

►⏱️ Timestamps ⏱️
0:00 Intro
0:40 Sponsored Message
1:39 Import Cinemachine
2:09 CinemachineVirtualCamera Script
2:39 CinemachineBrain Dynamic Code
4:35 CinemachineVirtualCamera Dynamic Code
8:00 AddCinemachineComponent and GetCinemachineComponent
10:10 FreeLook Camera Overview
11:20 Cinemachine Input Provider for New Input System
12:11 FreeLook Virtual Camera Dynamic Code
12:58 Get FreeLook Virtual Camera Rigs
12:47 Add Cinemachine Noise with CinemachineBasicMultiChannelPerlin
14:53 Adding Cinemachine Extensions through code
15:29 Custom Cinemachine Extension Unity
16:09 Changing the CinemachineInputProvider with the AxisState.IInputAxisProvider interface
16:35 Outro

??THANK YOU TO ALL MY PATRONS ??

❯❯❯ My Links ❮❮❮
? Patreon ?
https://www.patreon.com/samyg
? Discord Server ?
https://discord.gg/SwCKB3Q
? Twitter ?
https://twitter.com/samyam_utube
? Facebook ?
https://www.facebook.com/samyam.youtube/
? Music ?
Elon
Ambient Gold
streambeats.com
? Thumbnail Art ?
Lewis W. Veasey
https://opengameart.org/content/security-camera
? Like and Subscribe! ?

?️ Computer Setup ?️
*As an Amazon Associate I earn from qualifying purchases.
https://www.amazon.com/shop/samyam

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!

#madewithunity #gamedev #unity