Creating a Third Person Camera using Cinemachine in Unity! (Tutorial)

  Рет қаралды 482,863

Unity

Unity

Күн бұрын

Пікірлер: 323
@unity
@unity 4 жыл бұрын
You can download the final project with the camera setup here: on.unity.com/36nVNzt
@samankargar6708
@samankargar6708 4 жыл бұрын
Thank you so much.
@samankargar6708
@samankargar6708 4 жыл бұрын
I had a question about the camera, is it possible to rotate the character without the camera rotating with it? (like when I press "A" the character rotates to left) I tried to do it but my camera rotates with my player character.
@xephosbot
@xephosbot 4 жыл бұрын
@@samankargar6708 I also ran into this. Haven't you found a way to remove camera rotation while following the player?
@joshuablazer123
@joshuablazer123 4 жыл бұрын
@@samankargar6708 Try moving the LookAt out of the player hierarchy, and then attaching a quick script to the LookAt to make just the transform equal to the player's transform (and not the rotation). Worked for me :)
@samankargar6708
@samankargar6708 4 жыл бұрын
@@joshuablazer123 Thanks for the help It works now.
@nervun8097
@nervun8097 4 жыл бұрын
Now Brackeys has quit. You are my only hope.
@imgone1705
@imgone1705 4 жыл бұрын
Agreed
@ReaderOfTheMind
@ReaderOfTheMind 4 жыл бұрын
lmao
@457Deniz457
@457Deniz457 4 жыл бұрын
😆😆 Dont worry. Someone new will "replace" him very soon. I'am sure.
@457Deniz457
@457Deniz457 4 жыл бұрын
@@bezoro-personal Documentation 🤣 Good joke. Its just to time consuming.
@457Deniz457
@457Deniz457 4 жыл бұрын
@@bezoro-personal Well actually I think there isnt rly much more which Brackeys could have tell us. Maybe a reason more why he stopped. He already has a tutorial or an tutorial LIKE video about nearly everything you can show which isnt deep. So it was never a channel which advanced ppl needed.
@RoboGameOfficial
@RoboGameOfficial 3 ай бұрын
For anyone who is watching currently, you need to use Cinemachine Third Person Follow. Add a Cinemachine Brain to the camera you wish to use (e.g. Main Camera) and then attach a Cinemachine Camera and the Cinemachine Third Person Follow to the virtual game object, and then follow from there.
@zionen01
@zionen01 4 жыл бұрын
Very impressive stuff, unity is making it easier and easier to make more complex games. Before I never thought about creating a full 3d game alone, but now its looking possible.
@LunarBulletDev
@LunarBulletDev Жыл бұрын
Absolutely, unity is a god send, how is your journey doing?
@папагном
@папагном Жыл бұрын
he's dead @@LunarBulletDev 💀
@Gav2965
@Gav2965 4 жыл бұрын
Wow, they actually listened and made almost real tutorial with an explanation on what is going on, nice👏
@Underarmour81
@Underarmour81 3 жыл бұрын
Yeah really!
@kisstepan
@kisstepan 3 жыл бұрын
The key word is "almost"
@bellocktx5800
@bellocktx5800 2 жыл бұрын
@@kisstepan Exactly!
@yonatanabergel
@yonatanabergel Жыл бұрын
this is the 8th time I am watching this video, every project it comes back all over again xD
@hoax2
@hoax2 Жыл бұрын
RE the aiming camera or target/projectile offset 9:00 - might help someone else to know that Resident Evil 2 solved this using hit-scan from the camera not from the player model.
@tientam779
@tientam779 4 жыл бұрын
thank you so much for linking the Unity Royale Project. I've seen so many Unity tutorials use assets from there, but didn't know where the project was.
@thebloocat
@thebloocat 4 жыл бұрын
3:22 Anybody understood how to set up the mouse movement script? I didn't get that part.
@pierresainz1895
@pierresainz1895 4 жыл бұрын
@Unity could you help us understand this?
@AwesomeTehPwnder
@AwesomeTehPwnder Жыл бұрын
Thank you so much for the bit of information about what object the camera should rotate starting around the 3:32. I've been trying to get my rpg camera controller to pan around the player if I hold left click, and to drive the player movement direction when I hold right click. Your solution is so simple and I was overcomplicating it.
@khushalkhan83
@khushalkhan83 4 жыл бұрын
Project link is does not contain this scene, please upload the project shown in the video thanks
@trod146
@trod146 4 жыл бұрын
hahaha...
@jayjoonprod
@jayjoonprod 4 жыл бұрын
I can also see my seeker stone missing, please upload it in a moment, thanks in advance
@rizamifthahusyifaudin7234
@rizamifthahusyifaudin7234 4 жыл бұрын
can you share the rotation mouse look 3:43 where i can script like that?
@catafest
@catafest 3 жыл бұрын
Good video tutorial. After the aim status, you can use a virtual camera to follow a short time range the arrow even shows the effect on the target. The change of camera for aim staus need to be short.
@XcutAngel
@XcutAngel 4 жыл бұрын
Me when I code: "I need this to go fast... let's try Uhhhh.... 1500... No... *700... No... 400? Yeah that looks ok." Unity: "343 meters is the speed of sound." Me: ".../cough/ yeah I knew that...."
@peeei7423
@peeei7423 4 жыл бұрын
HELP MY CINEMACHINE BODY DOENST HAVE A "third person follow " ON IT. ITS STUCK ON TRANSPOSER
@AndresGomez-uo8st
@AndresGomez-uo8st 4 жыл бұрын
It seems like you have an old version of Cinemachine, update it from the package manager
@peeei7423
@peeei7423 4 жыл бұрын
@@AndresGomez-uo8st but it says up to date in my package manager edit : does it have something to do with the fact that im making a mobile game?
@Xsjr03
@Xsjr03 4 жыл бұрын
@@peeei7423 It may say "up to date" but you can still find newer releases available. I had the same problem, when i first installed it, it downloaded version 2.3.2 i think, then i checked again and found 2.6+ available that actually had the "Follow 3rd person" feature.
@peeei7423
@peeei7423 4 жыл бұрын
@@Xsjr03 so uuuh, how exactly can i fix that?
@toluyole
@toluyole 3 жыл бұрын
I know I have *The Exact Same Problem* And I've been roaming the comments to find the answer!!!
@nuevostitanes2
@nuevostitanes2 4 жыл бұрын
I was trying to replicate this tutorial, but since in this proyect (the Unity Royale Project ) there are not the same assets ( I mean the scripts PlayerInput, PlayerMovement, PlayerAimController and so on...) it is being quite a bit difficult, since I needed start by programming something similar. It would help if you give us this scenario. Thanks a lot, and anyway this is a great tutorial.
@katana789
@katana789 4 жыл бұрын
Wow, I think I found the golden tutorial, can’t wait to try it out.
@notnanomercy
@notnanomercy 4 жыл бұрын
This is all good, but i dont know... cross hair seems off to me
@BRIANROSER
@BRIANROSER 13 күн бұрын
Yeah, should probably adjust the aim to where the camera is looking at all times. Theyre just showing off their components, not making an ideal game mechanic
@leross6093
@leross6093 3 жыл бұрын
Guys, if you can't find the third person follow option, it could be cause you're using the latest cinemachine version. Don't forget he's using the 2.6.0 versión in the package manager
@corr2143
@corr2143 3 жыл бұрын
Thanks! Just updated to beta 🤞
@EchoYoutube
@EchoYoutube 4 жыл бұрын
I'm not trying to be disrespectful, but I'm not so sure that this tutorial is in my wheel house. A lot of the variables and things presented here, went really fast in the video so I wasn't able to really pick up on anything besides some of the basic camera setups in the beginning. I understand we can download the final project, but I'm not as much interested in the base files as I am in learning the fundamental aspects of this through a more regulated pace(aka: Learning to construct the scripts from scratch so I can learn the process without having to download a bunch of unnecessary files that I won't be using for my project anyways), so maybe this wasn't the right source to go to for a beginner? I'm not one to make judgement though. I am not calling this tutorial bad(because it certainly is not, it touches upon a lot of great subjects), I'm only stating that it was a little too rapid for me. Does anyone have a link to a video that might be a bit more mild-paced for beginners?
@grindx1292
@grindx1292 4 жыл бұрын
Brakeys
@notrue4u
@notrue4u 3 жыл бұрын
yeah, same I just couldn't get what he said and as you said everything was explained too quickly.
@michaelmcveigh9534
@michaelmcveigh9534 3 жыл бұрын
@@notrue4u you can pause it. And then after you understand, hit play again. This way it will be explained at whatever speed you want.
@calcuquack1206
@calcuquack1206 3 жыл бұрын
Because you are dumb
@PeterMilko
@PeterMilko 4 жыл бұрын
Great video please keep making more. Tilemap system seems unfinished, would love an update for that and tutorials.
@Oxmond
@Oxmond 4 жыл бұрын
Nice Cinemachine tutorial! 🤓🧡
@wyattsahem9757
@wyattsahem9757 2 жыл бұрын
This actually worked well! Thank you!
@LordsofMedia
@LordsofMedia 4 жыл бұрын
Rotate the target object! That's a good trick. A lot simpler than what I have been doing.
@blgamedev
@blgamedev 3 жыл бұрын
Is your player snapping when it rotates? Does that annoy you? I responded below to a comment about the character snapping to the followTarget's rotation. Reposting it here for more visibility. The Problem: The transform.rotation value of the player is being set instantly, which leads to player snapping away from the camera when the player starts moving. This is undesirable behaviour. We want a smooth rotation from the player's current rotation to that dictated by the camera. The Solution: First, make sure your follow target is NOT A CHILD OF THE PLAYER. If the follow target is parented to the player, this approach will fail. Next, give your movement script a reference to the followTarget transform. In the mover's update function, always set the position of the followTransform to that of the mover. Then, only when the mover is moving (MoveInput != Vector2.zero), Lerp the mover's transform from its current rotation to that of followTransform (only on the y axis). Unlike the video, I never reset the followTransform's y rotation to zero. See the pseudo code below and let me know of any questions. Happy to Help! public class Mover : Monobehaviour { [SerializeField] private Transform followTransform; private float rotationSpeed = 10; private Vector2 MoveInput; public void Update() { followTransform.position = transform.position; ... if(MoveInput != Vector2.zero) { Quaternion targetRotation= Quaternion.Euler(0, followTransform.rotation.eulerAngles.y, 0); transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, Time.deltaTime * rotationSpeed); } } }
@atk0l847
@atk0l847 2 жыл бұрын
Thank you so much!!! It took me days to find a solution to this problem.
@12marcal12
@12marcal12 2 жыл бұрын
its priceless. the slickness and the passion of the devs. priceless. what is cheaper and better than soft? Piracy is NOT the answer if you
@junpeiiori4720
@junpeiiori4720 4 жыл бұрын
Great video. Also I don't know if it's worth to say, but I love the way the host is talking. He sounds like a great guy 👌
@christianrichters7922
@christianrichters7922 4 жыл бұрын
Make sure you select the main camera in your scene before clicking Create Virtual Camera! Its unclear to me where you put the first script that was created.
@ivandamyanov
@ivandamyanov 3 жыл бұрын
Can't figure out why, it always ends up as a first person camera. I tried what you suggested and the result is the same :X
@Smeewo
@Smeewo 3 жыл бұрын
@@ivandamyanov Check if you installed the 2.6.0 version of Cinemachine. I had the same problem and installing the same version version as the tutorial (2.6.0) solved it :)
@pranjalkhatri5631
@pranjalkhatri5631 4 жыл бұрын
When would ECS will be available in stable release? It's not present in my 2020.4
@unity
@unity 4 жыл бұрын
Hey there! We don't have any ECS updates to share at this time, but rest assured it is something the team is still actively working on! Please keep an eye on our Blog, as we’ll be sharing regular development updates. blogs.unity3d.com/
@dhvyse
@dhvyse 3 жыл бұрын
I keep creating the virtual camera but it's in the ground or too close to the character, nto sure what I'm doing wrong here.
@AliJayShannon
@AliJayShannon 3 жыл бұрын
I had that, cinemachine 2.7.3 or something, i uninstalled and went to 2.6.0. Worked like the video. However i cant get the scripts working so its a bust overall.
@adamgrey268
@adamgrey268 3 жыл бұрын
In my testing, the camera did not automatically move to and focus on the player's forward position. I ended up making the look-at-target the Follow Target game object to get my camera to look that way. I'm not sure if I messed up somewhere, but this was the only way I could get it looking in the right direction.
@killxen9748
@killxen9748 4 жыл бұрын
The script you mentioned for rotating the camera, can you share that?
@rizamifthahusyifaudin7234
@rizamifthahusyifaudin7234 4 жыл бұрын
yeah i need that too
@realtimberstalker
@realtimberstalker 4 жыл бұрын
The whole project is available for download in the description.
@chaojack3113
@chaojack3113 4 жыл бұрын
Can someone tell me where to download the project files
@deadshxll
@deadshxll 3 жыл бұрын
look before u ask, its in the description
@Revard0001
@Revard0001 3 жыл бұрын
I don't understand where the scripts shown at 4:00 comes from, is that their script? Or we have to make it? How is it applied????
@Massive-3D
@Massive-3D 4 жыл бұрын
only 11 minutes and some seconds. You Ujnity Tech people are really amazing.
@haruka3203
@haruka3203 3 жыл бұрын
3:43 Wait you have to do this manually now? What happened to the Component "Cinemachine FreeLook Camera"?
@dontseemyprofilepicture1292
@dontseemyprofilepicture1292 4 жыл бұрын
Oh my god! Unity is so good ☺☺! Keep going unity workers, 👍👍👍 to u, Respect ur efforts!
@megascarFRHD
@megascarFRHD 4 жыл бұрын
I don't have the 3rd Person Follow Property at 2:17 , Am I the only one in this case ?
@jobbydude
@jobbydude 4 жыл бұрын
Upgrade to Cinemacine version 2.6 or later in the package manager
@megascarFRHD
@megascarFRHD 4 жыл бұрын
@@jobbydude I am on version 2.6.3 and still having this issue :/
@megascarFRHD
@megascarFRHD 4 жыл бұрын
ok, well, I must be really exhausted, I didn't look at the correct location Everything is working fine for me ! :D
@KarenKawas
@KarenKawas 4 жыл бұрын
can someone tell me where is he getting the nextRotation value? like what type of variable that is? I know its Quaternion but where is he declaring it?
@bhavinvs
@bhavinvs 4 жыл бұрын
Let me know if you find answer to that.
@Caspar13
@Caspar13 3 жыл бұрын
it's declared in the PlayerMovementInputController script (line 18): public Quaternion nextRotation. Unfortunately, it's not visible in the video.
@kureysalp
@kureysalp 3 ай бұрын
He's assigning a value to it but not using it anywhere. Don't know why it even exists lol.
@MetrixGoat
@MetrixGoat 4 жыл бұрын
unitys particle system is life
@regys9521
@regys9521 2 жыл бұрын
Amazing video, thank you so much
@garthflint
@garthflint 3 жыл бұрын
The project download does not have the movement of the tutorial character.
@alejandrogiorgi8014
@alejandrogiorgi8014 3 жыл бұрын
Im facing the same problem
@scratchguy5851
@scratchguy5851 3 жыл бұрын
Hi, how did u made the bow and arrow function? Plz make a tutorial
@voidling2632
@voidling2632 3 жыл бұрын
watch the video.. or download their files and look for yourself
@user-ul5wq3kv4p
@user-ul5wq3kv4p 3 жыл бұрын
This needs to be updated for the Unity 2021 . Cinemachine installation changed a bit etc
@johnx140
@johnx140 4 жыл бұрын
BROOOO I NEEDDED THIS. I feel like there are alot of things in Unity without a Tutorial. Like how to use the particle effects in detail, what every litle thing does, things like that.
@rayfont
@rayfont 4 жыл бұрын
Can Cinemachine cameras be cut when targets warp or position changes? In my project right now, in this case, there is a problem with the camera chasing the target with a fast damping speed.
@josepaternina1128
@josepaternina1128 4 жыл бұрын
//Compute the delta position of your character: it's just the difference between the current position and the new one Vector3 deltaPos = endPoint.transform.position - player.transform.position; //Warp your character to the new position. In this example I'm moving it to the endPoint player.transform.position = endPoint.transform.position; //Pick your cinemachine camera and warp it to the new position using the delta and the OnTargetObjectiveWarped method. CinemachineCore.Instance.GetVirtualCamera(0).OnTargetObjectWarped(player.transform, deltaPos);
@rus89
@rus89 3 жыл бұрын
So satisfying just watching this gameplay and all effects 🙂
@omiorahman6283
@omiorahman6283 4 жыл бұрын
How to point camera to CG pictures or mp4cutscenes in the scene
@zamatallica7
@zamatallica7 4 жыл бұрын
Place your Picture or Video inside an Invisible Object, like a Cube, make the camera point to the 3d Object which contains your video, picture
@jayjoonprod
@jayjoonprod 4 жыл бұрын
How about the collision of camera with obstacles? I'm curious.
@samy7342
@samy7342 3 жыл бұрын
Same
@diliupg
@diliupg 3 жыл бұрын
Very well done! Thanks!
@oscarreyes1056
@oscarreyes1056 4 жыл бұрын
Doesn't cinemachine already have a 3rd person camera rig? The extra script in this video seems redundant and less customizable.
@mugenybk
@mugenybk 4 жыл бұрын
update your cinemachine from package manager
@szenosdev
@szenosdev 3 жыл бұрын
Thanks Unity, really cool!
@katana2665
@katana2665 3 жыл бұрын
Excellent work.
@johnglasburg8309
@johnglasburg8309 4 жыл бұрын
If this was done less than two months ago then why is third person not an option under body? Edit: Might be a version issue, checking. edit edit: Version issue ,needed to update (for some reason package manager did not default to current version)
@maynardsantos4687
@maynardsantos4687 4 жыл бұрын
TY for pointing out the version mismatch!
@marcinziajkowski3870
@marcinziajkowski3870 2 жыл бұрын
Do u have video how to set up character mesh to aviche aim effect. I mean, while u aiming and move camera then ur character also move top (head, torso, schoulders, bow).
@ZackOfAllTrad3s
@ZackOfAllTrad3s 7 ай бұрын
why did you leave out the fact that you have to add a CinemachineBrain to the main camera?
@andrewdddo
@andrewdddo 2 жыл бұрын
can someone help me, I'm trying to learn how to use the scripts but I don't know where to add them as components? mainly my character isn't moving - any advice on this?
@Kavee_3
@Kavee_3 2 жыл бұрын
This is awesome, than you so much
@crimsonskorpio
@crimsonskorpio 4 жыл бұрын
After around 4 minutes, I have no idea what's going on as far as coding and the additional settings go lol other than that, this was a great video
@dogzer
@dogzer 4 жыл бұрын
I love that character!
@sarthakmusale9752
@sarthakmusale9752 Жыл бұрын
I want to revolve the camera around avatar on mouse drag. I have used the virtual camera. On the main camera object i have achieved this functionality by a script but when I used that script on virtual camera its not working. any solution for that..??
@twoboxtoofurious
@twoboxtoofurious 3 жыл бұрын
Awesome video!
@paulorodriguez6288
@paulorodriguez6288 4 жыл бұрын
I've seen that you can change the cinemachine camera priority to switch between different camera angles, is enabling/disabling them more efficient?
@howlingwolffang2221
@howlingwolffang2221 2 ай бұрын
How do you get the camera to rotate back behind the character
@touqan5091
@touqan5091 3 жыл бұрын
I can't control the camera how do I do it it 2019.4?
@marcrasmussen474
@marcrasmussen474 4 жыл бұрын
The Github project does not contain the actual code presented in this video?
@abouditv724
@abouditv724 4 жыл бұрын
We need more of 3rd person shooter
@bahaatamer1245
@bahaatamer1245 Жыл бұрын
I tried downloading this project, it says "Insufficient permissions", and there's nothing I can do about it. Any other alternatives?
@drr1867
@drr1867 4 жыл бұрын
The project doesn't seem to work when imported. Anyone have the scripts used in the video please?
@w1-w2-w3
@w1-w2-w3 3 жыл бұрын
It works.
@mkeyla_creates790
@mkeyla_creates790 3 жыл бұрын
Help! My virtual camera doesn't keep it's distance (i can't even change the distance) from the target! why??
@ttttkk2
@ttttkk2 3 жыл бұрын
I did as the video says, but the virtual camera is located exactly where the "follow target" object stands and it stays there no matter how I change the distance.
@kmonty2009
@kmonty2009 3 жыл бұрын
I found that issue too. I just moved the target back a bit.
@kmonty2009
@kmonty2009 3 жыл бұрын
Disregard... I see the issue with doing that. I'm having the same problem
@prestonrussell1452
@prestonrussell1452 3 жыл бұрын
You might have figured it out by now, but I fixed this. I had to disable the collisions. Set the player with a "player" tag and then set the ignore tag on the virtual camera to "player".
@majnoon1935
@majnoon1935 4 жыл бұрын
guys i had a question please help : do game developer needs to learn VFX or VFX maker is a different with coder? and does VFX need any coding? cuase i hate graphic works and love coding tnx for you help and sorry for my bad grammar .
@xyxean
@xyxean 3 жыл бұрын
2:15 i don't have third person follow
@maximilianwinter582
@maximilianwinter582 3 жыл бұрын
Make sure you have updated to the newest version of cinemachine through the package manager, I had the same problem, because it was outdated.
@FlashBreakerOfficial
@FlashBreakerOfficial 3 жыл бұрын
cool tutorial, thx you
@beautiful_moments_89
@beautiful_moments_89 Жыл бұрын
What OS systems do cinemachine support? Thanks you
@dspartan007
@dspartan007 4 жыл бұрын
Great Video. Thanks.
@wartem
@wartem 3 жыл бұрын
How do you change the camera distance in C# while using the 3rd Person Follow?
@fredtchiadeu1089
@fredtchiadeu1089 2 жыл бұрын
That's a good tutorial thanks. Please, in the Editor my cinemachines are great but on a build they are pretty slow(very slow)and that's not the whole game just the cinemachines camera, how can I make my cinemachine smoother after making a buid
@miz0n3-
@miz0n3- 4 жыл бұрын
Please make a tutorial about particle system with more details. I really need some knowledge about it.🙏🙏🙏🙏
@boithebingus3317
@boithebingus3317 Жыл бұрын
When i run the game i get an error message that says: "display 1 no cameras rendering" how could i fix this?
@bahadirkandemir
@bahadirkandemir 4 жыл бұрын
Need a similar video for a Diablo like camera :) Pleeeease
@LordOfLemon
@LordOfLemon 3 жыл бұрын
Dude just make it a top-down camera that follows the player by lerping the camera coordinates. It's much easier than a third-person camera, it doesn't even need to rotate.
@jghollowell4
@jghollowell4 2 жыл бұрын
This is remarkably turning out to be a corrupted file that I just downloaded from you, I can't delete the .zip?
@jaykhandelwal2879
@jaykhandelwal2879 4 жыл бұрын
How to make such an environment in unity. What it needs?
@DARK_AMBIGUOUS
@DARK_AMBIGUOUS 3 жыл бұрын
Make trees and stuff in blender and import them into unity
@Lamnul
@Lamnul 3 жыл бұрын
in my unity does not appear package / unity registry pliese help me
@deathdefiler4306
@deathdefiler4306 3 жыл бұрын
The tutorial was almost perfect. The code just didn't show what _look was so I had to download the project to find out what that was.
@BluePhantomStudio
@BluePhantomStudio 3 жыл бұрын
Will I be able to tilt my camera for wallrun? I was having rotating tha players
@halfbakedproductions7887
@halfbakedproductions7887 Жыл бұрын
The problem is that a lot of newbies to Unity don't know this kind of thing exists, so they waste time and become frustrated by following questionable tutorials on how to hand-hack some garbage that ultimately just doesn't work. They look at other Unity devs and AAA releases that do these things perfectly... and eventually just become depressed and give up. Source: me. The same goes for the new Input System. It's so much better, but newbies are drawn to the old one because that's what all the old tutorials use.
@kevinkelly6756
@kevinkelly6756 4 жыл бұрын
Please make more tutorials because brakeys left
@IndieScapeGames
@IndieScapeGames 4 жыл бұрын
This was good but a bit fast paced, and please don't show images of the source code, write it out in the video. Would help with the digestion of all the info coming at us :)
@Crons-v3f
@Crons-v3f 3 жыл бұрын
I opened the project but I can't move the player or the camera? Do I need to do something before?
@maxpanic3633
@maxpanic3633 2 жыл бұрын
Hey everyone, I used the script but my camera automatically TP to the feet of the player, any idea where it could have came from ?
@ginner9635
@ginner9635 4 жыл бұрын
LOL guys. Its 2020 and you make a sample project of your own technology in 2019 version (or older) of your own product. WOW. Just wow
@Lukeibol
@Lukeibol 4 жыл бұрын
2019 version is better because it has LTS
@gfplatinum
@gfplatinum 3 жыл бұрын
Ok but where do I get the variable _look?
@CAESAR_IS_GOD_mohammadisaloser
@CAESAR_IS_GOD_mohammadisaloser 3 жыл бұрын
wheres the camera controller in the files? I looked in assets - scripts to no avail??
@currymcurry5721
@currymcurry5721 3 жыл бұрын
Wich game Style does unity use in this video?🤔
@WobZone
@WobZone 3 жыл бұрын
Great explanation. Question to anyone that might be able to help: How would I make the character rotate towards the direction of where it's going (right, left, backwards) without the camera snapping to behind the character when he does. Thanks in advance :)
@blgamedev
@blgamedev 3 жыл бұрын
Hi Wob Zone, I too was experiencing this problem and it annoyed me. I have a solution that feels slightly hacky but I don't think it compromises performance and it is pretty intuitive. The Problem: The transform.rotation value of the player is being set instantly, which leads to player snapping away from the camera when the player starts moving. This is undesirable behaviour. We want a smooth rotation from the player's current rotation to that dictated by the camera. The Solution: First, make sure your follow target is NOT A CHILD OF THE PLAYER. If the follow target is parented to the player, this approach will fail. Next, give your movement script a reference to the followTarget transform. In the mover's update function, always set the position of the followTransform to that of the mover. Then, only when the mover is moving (MoveInput != Vector2.zero), Lerp the mover's transform from its current rotation to that of followTransform (only on the y axis). Unlike the video, I never reset the followTransform's y rotation to zero. See the pseudo code below and let me know of any questions. Happy to Help! public class Mover : Monobehaviour { [SerializeField] private Transform followTransform; private float rotationSpeed = 10; private Vector2 MoveInput; public void Update() { followTransform.position = transform.position; ... if(MoveInput != Vector2.zero) { Quaternion targetRotation= Quaternion.Euler(0, followTransform.rotation.eulerAngles.y, 0); transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, Time.deltaTime * rotationSpeed); } } }
@andriusdaraskevicius
@andriusdaraskevicius 3 жыл бұрын
@@blgamedev thanks, this is just what I needed
@tryggvi1239
@tryggvi1239 2 жыл бұрын
notes for anyone watching this in 2022 With the newer versions, Cinemachine no longer appears in the main menu. You'll find it in the GameObject menu, or if you right-click on the hierarchy.
@samtornblom2393
@samtornblom2393 Жыл бұрын
Why doesnt the camera follow my Follow target?
@jedan195
@jedan195 3 жыл бұрын
where and how do you create such assets? I want to learn how to model and animate like this ,can someone suggest me tutorial?
@mobeenahmedraza3575
@mobeenahmedraza3575 3 жыл бұрын
did u find one..?
@jedan195
@jedan195 3 жыл бұрын
@@mobeenahmedraza3575 yes you can try blender software to make such assets,charecters and animations or can also use unity's probuilder for fast level creation
@ShinichiKudoQatnip
@ShinichiKudoQatnip 2 жыл бұрын
I didn't understand how to fix the aim and target
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
2,000 People Fight For $5,000,000
24:45
MrBeast
Рет қаралды 57 МЛН
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,5 МЛН
Getting started with Bolt in Unity! (Tutorial)
13:24
Unity
Рет қаралды 218 М.
How to use Cameras in Unity: Cinemachine Virtual Cameras Explained
14:31
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
Easily Control Cameras with Cinemachine in Unity!
12:20
Code Monkey
Рет қаралды 96 М.
Camera-Relative Movement in Unity 3D Explained
18:50
iHeartGameDev
Рет қаралды 46 М.