How to make a 3rd Person Shooter in Unity | Cinemachine & Input System

  Рет қаралды 129,414

samyam

samyam

Күн бұрын

Пікірлер: 520
@publicalias8172
@publicalias8172 3 жыл бұрын
The fact you timestamped an hour-long video is enough to subscribe.. thank you so much that's rare in unity tutorials !!
@samyam
@samyam 3 жыл бұрын
Thank you :))
@samyam
@samyam 3 жыл бұрын
Hey y’all! Here’s the next video: Adding Animations | Blend Trees, Layers, & Animation Rigging - 3rd Person Shooter - Unity Tutorial kzbin.info/www/bejne/a2mWg2yCnLeNhqM If blending between the different cinemachine camera's has a large position offset, try the following: *Cinemachine Virtual Camera > Transition > Inherit Position // will inherit from the previous camera’s position
@spartadiunruly6212
@spartadiunruly6212 3 жыл бұрын
hi I have just realized that when you change Unity input to Scripts it gives you Errors...Noted... THANKS
@harrymash1531
@harrymash1531 8 ай бұрын
THANK YOU I WAS HAVING THIS PROBLEM ubuueijabfuawgbruyfdjawhb8ir
@LoganIsLive
@LoganIsLive 3 жыл бұрын
I just stumbled upon your tutorial after trying to slog through a bunch of other 3rd person shooter tutorials. As a complete beginner, your video was absolutely perfect. Thank you so much!
@samyam
@samyam 3 жыл бұрын
Awesome, glad you liked it!
@NotNazuh
@NotNazuh 3 жыл бұрын
Same
@irukahahah
@irukahahah 3 жыл бұрын
Amazing video! super complete and perfectly explained, just a few cuts that leave out only a few small changes in the strings but with a little attention everything works beautifully!
@samyam
@samyam 3 жыл бұрын
Thank you :)
@rickyreaves5794
@rickyreaves5794 2 жыл бұрын
Sam I love it, I can't say how much of a help this has been. decided against using too many asset packages so this is wonderful! I sure do hope you keep going
@samyam
@samyam 2 жыл бұрын
Thank you!! I do plan to! :D
@CharkGames
@CharkGames Жыл бұрын
Just in case, as I have seen others mention, if you get the targetRotation doesn't exist issue, it's because her program autocorrects. So the line before was Quaternion rotation, but when she writes in the next line targetRotation her program autocorrects the previous line to also be Quaternion targetRotation instead of rotation. Hope this helps!
@syncrowave9815
@syncrowave9815 Жыл бұрын
You're a legend
@booo-live7624
@booo-live7624 2 жыл бұрын
It’s totally worth learning new skills cause then you get excited and confident to create
@juliaalder2007
@juliaalder2007 3 жыл бұрын
I am so glad that you are here. :)
@samyam
@samyam 3 жыл бұрын
Thanks!
@B1gV33
@B1gV33 Жыл бұрын
Thank you so much for this video. Started my game dev journey about 10 days ago. This has inspired and motivated me so much! It's been great!
@samyam
@samyam Жыл бұрын
Congrats on starting 👏✨
@MongiChan
@MongiChan Жыл бұрын
Thank you, the best TPS controller tutorial!!!
@samyam
@samyam Жыл бұрын
Thank you!
@izumi_desu
@izumi_desu 9 ай бұрын
I LOVE this tutorial. Although this system is really specified for TPS games, it can be used for more games such as Mecha games (the genre I specialize in)! The scripts and components used are so modifiable to your liking. AMAZING tutorial!
@kevinbasel8401
@kevinbasel8401 3 жыл бұрын
I didn't expect to find all these informations!! Really a great tutorial that covers every topic at 360°. Finally I've found a good youtuber after Brackley left. Immediatly subbed, thanks a lot!
@samyam
@samyam 3 жыл бұрын
Thank you!
@drevcronsole
@drevcronsole 3 жыл бұрын
Its brackeys san
@kevinbasel8401
@kevinbasel8401 3 жыл бұрын
@@drevcronsole bracleys made a same video but she covered even more topics! I would say she is his mom xD
@samyam
@samyam 3 жыл бұрын
that would be strange 😳
@jonathanjblair
@jonathanjblair 3 жыл бұрын
I'm a big fan of the full system tutorial instead of just "here's part go figure out the rest on your own". Videos like this take a ton of time. Much appreciated.
@samyam
@samyam 3 жыл бұрын
Thanks!! Yeah it took a while 😅
@Lpd_n
@Lpd_n 3 жыл бұрын
Exactly
@juaecheverria0
@juaecheverria0 2 жыл бұрын
You mean like codemonkey, trynna sell his course? Lol
@halc4261
@halc4261 2 жыл бұрын
This is the BEST video tutorial I ever find on youtube. I really love this video tutorials what have like 1 hour (im not fan of the speedrunning coding in like 10 minutes). Perfectly described what everything means, doing, what functionality it has... Im so proud of you for that Im being teached by a girl
@haisesasaki6861
@haisesasaki6861 2 жыл бұрын
Thank you for making this video. It helped me understand the new unity input system aswell unity 3d basics! I was a Unity 2D Developer but the switch to 3D was very flawless because of this video! I appreciate the work you put in this tutorial :)
@samyam
@samyam 2 жыл бұрын
Happy to have helped 🤘😁
@JasonSmith-pn6ch
@JasonSmith-pn6ch 2 жыл бұрын
@7:00 Thank You for sharing that powerful bit of knowledge.
@LM-cc7qz
@LM-cc7qz 3 жыл бұрын
I think this video is incredible compared to other tutorials because it explains how to change the camera settings to your liking and why we are adding this line of code, the reasoning behind it. Also not to be nit picky but euler is pronounced u-ler not oiler.
@samyam
@samyam 3 жыл бұрын
Thanks! Glad you liked it! I give up with that word, every time I try I say it wrong 😭 Next time 😤
@LM-cc7qz
@LM-cc7qz 3 жыл бұрын
@@samyam I know, I was just trying to find a way to let you know without being rude!
@samyam
@samyam 3 жыл бұрын
It’s okay! I appreciate it!! 😄
@badscotsman
@badscotsman 3 жыл бұрын
@@samyam your pronunciation is actually spot on... as oy•ler or "oiler" (definitely American pronunciation... but which language actually pronounces it as "u-ler"...??). Sources: en.wikipedia.org/wiki/Leonhard_Euler (the word does actually come from the famous mathematician's name) www.google.com/search?q=euler+pronunciation kzbin.info/www/bejne/h2rQqppsftRgf7M ... and my math professor from 25 years ago. ^^ Keep up the great work with your videos!
@samyam
@samyam 3 жыл бұрын
Ah yes you are right, it’s a tricky word 😳
@halc4261
@halc4261 2 жыл бұрын
If someone has a newer version of Unity and have problem with spawning Decals on the walls when shooting bullet on collision( 53:42 ), change the Floor (plane), in rigidbody check the Kinematic... and uncheck in other collision objects like wall etc. Also freeze the all rotations at the plane and wall.
@moliprod
@moliprod Жыл бұрын
when i want to shoot, it says that Destroying assets is not permitted to avoid data loss, idk what to do
@GameCragYT
@GameCragYT 2 жыл бұрын
Used spheres to make eyes on my bean. 10/10 made testing a million times better xD
@jacobtrucomrade5555
@jacobtrucomrade5555 2 жыл бұрын
wow super helpful and it worked just like in the video! clear instructions, so far the best tutorial I have ever seen!!! :D
@samyam
@samyam 2 жыл бұрын
Yay thank you!!
@UnSesame
@UnSesame 2 жыл бұрын
Thank you so much, with your videos I can now realise my project. I search a lot to get these 2 lines of code à 25:15 to rotate my player with the camera 🙂
@ryeon6593
@ryeon6593 2 жыл бұрын
Finally, someone who can pronounce Euler right.
@DavidGomez-tr9ph
@DavidGomez-tr9ph 2 жыл бұрын
Great tutorial, I was struggling with cinemachine and this helped lot, ty so much!
@francescodegallo7176
@francescodegallo7176 7 ай бұрын
great video! quick question: which key are you using to shoot the bullet? followed everything perfectly and no game errors, just missing this tiny info... thanks!
@yojan69
@yojan69 Жыл бұрын
thank god u say virtual cam is better, i wasnt sure if i had to change from freelook to virtual, now i know i can without really any problem, since now i hate freelook camera xd
@colbydanesaddoris
@colbydanesaddoris Жыл бұрын
Thanks for sharing... FYI no need to normalize the direction vector on a transform.. ex: cameraTransform.forward.normalized. might as well save the sqrt.. hmm.. that kind of sounds like a charity
@DaRealViso
@DaRealViso 11 ай бұрын
Everything is great. but one issue I've found is when I look down I lose speed. Any ideas as to why this is happening?
@BrijeshKumbhare
@BrijeshKumbhare 7 ай бұрын
Absolutely helpful tutorial. Thanks for this.
@SarahStarmer
@SarahStarmer 2 жыл бұрын
Thank you so much. This is exactly the tutorial I needed.
@wannurulnajihah
@wannurulnajihah Жыл бұрын
Hello, all your videos are really helping thank you very much 😭 I have two questions: 1. I wonder if you can control the player using the gamepad (left stick for movement and right stick for the camera) 2. How to switch to another controller if the game can play using both keyboard and mouse, and gamepad
@MiniaturesMyth
@MiniaturesMyth 2 жыл бұрын
Amazing tutorial, really good content, thanks so much. I'm having an issue though... My Aim Camera is not rotating with the mouse input while its not top priority. This causes miss alignment and crazy rotations. Any idea what might i be doing wrong?
@gokamekeck4999
@gokamekeck4999 2 жыл бұрын
I have the same problem here, did you find out how to fix it?
@GameCragYT
@GameCragYT 2 жыл бұрын
FIX for decals not despawning, replace your "OnCollisionEnter" with this: private void OnCollisionEnter(Collision other) { ContactPoint contact = other.GetContact(0); GameObject decal = Instantiate(bulletDecal, contact.point + contact.normal * .0001f, Quaternion.LookRotation(contact.normal)); Destroy(gameObject); Destroy(decal, 5); }
@STARS_Redfield
@STARS_Redfield 2 жыл бұрын
I have a problem with the decal and rigidbody, I cannot make it working with a mesh collider With Box collider + rigid body, it works, but my level is more complex and I cannot use box collider
@STARS_Redfield
@STARS_Redfield 2 жыл бұрын
Found a solution that works 25% of time: Adding the rigidbody to the sphere bullet, wich also alloy me to put gravitty on it. Only problem, someytime the collision are not working properly, the decal does not spawn and the bullet remains in place until it despawn
@jeronimocollares320
@jeronimocollares320 3 жыл бұрын
Best tutorial EVER and i see a lot...
@samyam
@samyam 3 жыл бұрын
Thank you!
@jeronimocollares320
@jeronimocollares320 3 жыл бұрын
@@samyam 3D (3D) Point and click, we can use this input system? Im studying by C# now, anyway, but...tense :D Have a way to we use this input system + Cinemachine - follow camera? This system have in old 'headquarters' from game EVE online. In certain part of the game, we change to a character into a 'room' and we controll this char with 1- point and click + 2 very basic WASD. Im trying to do something like this :)
@jeronimocollares320
@jeronimocollares320 3 жыл бұрын
@@samyam just more one comment, about cinemachine and AIM - the game what im working (indie) ll use this effect - EVE Online - from CCP Games - was the FIRST game what use this tech in 2003 :) Long time a go.
@ssandzz
@ssandzz 2 жыл бұрын
Amazing tutorial, thank you!
@kraythe
@kraythe Жыл бұрын
Excellent tutorial. One question. I have noticed some tutorials making a character a rigidbody but the samples dont. Is there any benefit to doing so?
@ritoon2223
@ritoon2223 2 ай бұрын
Thanks, very informative video
@katiepotempt1070
@katiepotempt1070 2 жыл бұрын
what if i already have a map for the scene setup?
@danotg6454
@danotg6454 2 жыл бұрын
Great video but i'm having issues with sprinting. I've changed controller.Move(move * Time.deltaTime * playerSpeed); to this and added a line above it var maxSpeed = (sprintAction.triggered) ? sprintSpeed : playerSpeed; controller.Move(move * Time.deltaTime * maxSpeed); Now when i press shift it does a quick jolt. I think i need to change "triggered" to something else. But what?
@samyam
@samyam 2 жыл бұрын
triggered will only be called on the frame that the button is pressed, you should instead use ReadValue which will return 1 while it is being pressed
@acida_banger
@acida_banger 2 жыл бұрын
When I am holding A and W at the same time to move diagonally I am not able to jump do you know why this is? (every other diagonal direction lets me jump for example I can jump while holding D and S to jump diagonally back and right)
@simonaperrella3535
@simonaperrella3535 2 жыл бұрын
I have a problem it dosen't let me drag the player script in the input action asset
@samyam
@samyam 2 жыл бұрын
Do you mean the input action asset into the player input component?
@devalt1
@devalt1 2 жыл бұрын
This was an excellent video, exactly what I needed to begin working on my game! Easy subscribe from me and I look forward to watching more of your videos!
@samyam
@samyam 2 жыл бұрын
Awesome thank you!!
@devalt1
@devalt1 2 жыл бұрын
@@samyam No probs! Just joined the discord to see what's going on 💪 hope the channel keeps growing!
@samyam
@samyam 2 жыл бұрын
Thanks again appreciate it 😄
@juliocesarsousasantana3017
@juliocesarsousasantana3017 2 жыл бұрын
Thank you SO MUCH
@MrBlankGod
@MrBlankGod 2 жыл бұрын
Very nice tutorial, well done ;D
@samyam
@samyam 2 жыл бұрын
Thanks Pedro!
@knowingph5802
@knowingph5802 2 жыл бұрын
you save my life 😍😍
@Warrior9300
@Warrior9300 2 жыл бұрын
Hi! How can i do the player keep aiming when i press (and release) a key and then when i press (and release) the same key again no longer aim any more?
@mahirinyeri
@mahirinyeri 2 жыл бұрын
Thanks. This is very useful.
@pollisgaming3168
@pollisgaming3168 Жыл бұрын
10/10 video
@SamuelArmer
@SamuelArmer 3 жыл бұрын
When I put the rigid body onto the wall the decals work, when I put the rigid body onto the floor I fall through it. Help Oh and, my camera doesn't collide with the wall it just goes through it
@DeKosta
@DeKosta Жыл бұрын
Anybody have trouble or know why mouse sensitivity on the horizontal axis is twice the speed as the vertical mouselook axis ? Thanks in advance for replies!
@DeKosta
@DeKosta Жыл бұрын
It was a simple user error of having different variables in the virtual camera settings.
@alexv9607
@alexv9607 3 жыл бұрын
Really good tutorial. How will you add run with the input system? I tried multiple things but i can't get it to work.
@samyam
@samyam 3 жыл бұрын
In the Update function you can read the value of the sprint button, and if it's pressed use the sprint speed you set instead of the normal walk speed. something like float speed = walkSpeed; if (sprintAction.ReadValue() == 1) or if (sprintAction.ReadValueAsButton()) float speed = runSpeed
@alexv9607
@alexv9607 3 жыл бұрын
@@samyam Thank you for the fast response and i got it working now thanks :)
@shikamarubh
@shikamarubh 3 жыл бұрын
Thanks for the very nice video, could you please do a tutorial about procedural animation ?
@samyam
@samyam 3 жыл бұрын
Thanks! I'll be using the Animation Rigging package in an upcoming video to animate the third person shooter character soon :)
@MLaurenavicius
@MLaurenavicius 2 жыл бұрын
That's awesome! You should have that patreon stuff, I'd subscribe
@samyam
@samyam 2 жыл бұрын
Thanks! I do have patreon it’s in the description:) patreon.com/samyg
@Cazyman24
@Cazyman24 2 жыл бұрын
the movement script is not working for me, i copied everything you did in the video and nothing is working
@samyam
@samyam 2 жыл бұрын
Is there an error? What’s not working?
@Cazyman24
@Cazyman24 2 жыл бұрын
@@samyam there is no errors that pop up or that I can find, I've looked through the player controls part of the video multiple times and I cant seem to figure out what the problem is. I've posted the screen shots of the code into your discord in #Help. Thank you for responding so quickly, any advice is much appreciated
@Cazyman24
@Cazyman24 2 жыл бұрын
@@samyam ok i know this is kinda far fetched but i restarted unity and it told me to update somthing and restart and now it works. i hate programming
@samyam
@samyam 2 жыл бұрын
it happens 😂
@zarinaattaria6025
@zarinaattaria6025 Жыл бұрын
can someone tellme how to zoom in?
@borislavSin
@borislavSin 3 жыл бұрын
Thanks for this video, its a great work to popularizing inportant changes in unity since they implemented new Input system and other cool staff. But one thing: when I tryed to hit play after implementing cinemachine camera with only new input system like "InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings. " going to "Both"-parameter was solve to this. Can you explain, plz, why this is bad to use both systems and, more important, how to follow along witn only new system and avoid this problem?
@samyam
@samyam 3 жыл бұрын
It's not bad to use both systems, but you should try to stick to one for consistency, however sometimes packages you use may use the old input system. Perhaps you forgot to change the Cinemachine input or the Event System input format?
@ambiguouscompany
@ambiguouscompany 2 жыл бұрын
YouRE Amazing
@samyam
@samyam 2 жыл бұрын
you’re amazing!
@Ltlegendary
@Ltlegendary 3 жыл бұрын
Great tutorial!
@samyam
@samyam 3 жыл бұрын
Thanks!
@Ltlegendary
@Ltlegendary 3 жыл бұрын
@@samyam Ofc! Looking forward to the second part:)
@NotNazuh
@NotNazuh 3 жыл бұрын
For some reason my visual studio doesn't detect the input system so it gives me errors for each line of code that includes stuff for the input system but it works fine in unity.
@samyam
@samyam 3 жыл бұрын
Try closing it, then in Unity, Assets>Open C# Project
@jonataslima8901
@jonataslima8901 3 жыл бұрын
Great video!
@samyam
@samyam 3 жыл бұрын
Thanks!
@drew9017
@drew9017 2 жыл бұрын
When I throw the player controller script on the player object, it doesn't create the Player Controller with all the values or show the fields it is supposed to serialize. Any ideas?
@drew9017
@drew9017 2 жыл бұрын
Ah Nevermind I figured it out. I was referencing the old input system through Vector2 instead of PlayerInput
@TheSallyOne
@TheSallyOne 9 ай бұрын
How do you add the script to player?
@gamedev6412
@gamedev6412 3 жыл бұрын
You are awesome!
@samyam
@samyam 3 жыл бұрын
Thank you! :D
@shroomik8510
@shroomik8510 3 жыл бұрын
Hi. When you got object between player and camera, you kinda shoot backwards. How fix it?
@samyam
@samyam 3 жыл бұрын
You can either make sure there is never an object between the camera and the player, by using the Cinemachine collider and playing with the values so that the camera avoids the object, or you can possibly determine the distance of the object hit to the camera, and if it's less than a certain amount you can avoid that target.
@shroomik8510
@shroomik8510 3 жыл бұрын
@@samyam Thanks
@elia0162
@elia0162 3 жыл бұрын
how can i remove the follow acceleration?
@samyam
@samyam 3 жыл бұрын
I think you mean the damping where it smooths out the camera movement when following the player, which you can adjust in the framing transposer settings. There’s also the lookahead time and smoothing which adjusts the offset based on the motion of the target docs.unity3d.com/Packages/com.unity.cinemachine@2.3/manual/CinemachineBodyFramingTransposer.html Is that what you mean?
@elia0162
@elia0162 3 жыл бұрын
I found the problem. I was using a freelook camera instead of a virtual camera. Thanks for answering me
@jeronimocollares320
@jeronimocollares320 2 жыл бұрын
Hi Samyan I'm redoing this tutorial. However, I would like to ask something. In rpg games, the camera rotates freely, being centered only when the player moves (at least in some rpgs I know). Would you have something you could implement or change in the code about? Appreciate.
@samyam
@samyam 2 жыл бұрын
Hi do you have an example clip of gameplay you can show me of what you mean? I don't play many RPG games.
@jeronimocollares320
@jeronimocollares320 2 жыл бұрын
@@samyam The witcher 3 :) (popular)
@jeronimocollares320
@jeronimocollares320 2 жыл бұрын
@@samyam Elder Scroll Online, another*
@jeronimocollares320
@jeronimocollares320 2 жыл бұрын
@@samyam i think that 'free camera in cinemachine have this option, no (when we release the W key, so, we can rotate the camera around - when we hold W key, camera centralize again)?
@Ltlegendary
@Ltlegendary 3 жыл бұрын
I wanted to ask why we unsubscribe from our aiming and shooting action on OnDisable()? If OnDisable() is called when the script or gameobject is disabled then how is this called here? I guess I also have sort of the same question for OnEnable() how is it able to do what it does on a method that gets called "at the beginning" or when it is enabled for the first and other times it is re-enabled?
@samyam
@samyam 3 жыл бұрын
Before the object is “disabled” the function is called, basically we want to unregistered the event so that the sender won’t be sending messages to a receiver that is disabled. OnDisable is also called by Unity before the object is destroyed. Unity controls all of this in the background, the calling of the functions and threads.
@Ltlegendary
@Ltlegendary 3 жыл бұрын
@@samyam I see, thank you. How are we able to shoot and aim on OnEnable()? Doesn’t this function get called only once or at least the times the object is enabled?
@samyam
@samyam 3 жыл бұрын
Yeah it only gets called when the function is enabled, we don’t actually aim and shoot in that function, but we subscribe to the event of shooting, which basically the input system is sending out these messages, but you need to listen for them, and in on enable we are saying “yes, I’d like to listen to them. And once I hear it, I will call this function” And then on disable we say “No, I don’t want to hear the messages anymore, I’m sleeping” Once you subscribe to the event Unity will keep track of your subscription in a list, and then remove it once you unsubscribe. And if the event is triggered, then unity will loop though the list of all available listeners and send them a message.
@Ltlegendary
@Ltlegendary 3 жыл бұрын
@@samyam Ah wow okay thank you for the clarification!
@dineshmaheshwari7768
@dineshmaheshwari7768 2 жыл бұрын
Geraldo Credo damn idk dude ​♂️
@Florijin
@Florijin Ай бұрын
Does not work in Unity 2023 => The tutorial works for me till @22:36 - after reworking the Player Controller Script no movement anymore 😞 1.)UnassignedReferenceException: The variable cameraTransform of PlayerController has not been assigned. SOLUTION: You have to TAG your Camera as MAINCAMERA! 2.) The name 'targetRotation' does not exist in the current context Yes - it is "Quaternion targetRotation" NOT "targetRotation"
@jefferrr7376
@jefferrr7376 3 жыл бұрын
how to make stage system like... player is enter the portal and the player is in the new level/scene :)
@samyam
@samyam 3 жыл бұрын
You can have a box collider that is a trigger, then in the ontriggerenter check if the tag is the player, and if so load the next scene
@GoblinArmyInYourWalls
@GoblinArmyInYourWalls 3 жыл бұрын
You fill the hole Brackey's left in my heart
@vcauxilium264
@vcauxilium264 5 ай бұрын
I am getting the error: 'PlayerInput does not containa definition for 'Actions', anyone know a solution to this?
@cinnamondum
@cinnamondum Жыл бұрын
around 23:45 when she makes the player face towards the direction of the camera it says "The name targetRotation does no exist in current context I am a beginner with unity so replying would help out a lot :) I tried everything I can think of lol
@JesseOghre-z8u
@JesseOghre-z8u Жыл бұрын
me too
@syncrowave9815
@syncrowave9815 Жыл бұрын
same
@Spark3r
@Spark3r 2 жыл бұрын
I need help, I was at 25:51 when you typed targetRotation however for me it said that, that doesnt exist in the current context, can you please help
@lohkiiinteractive3675
@lohkiiinteractive3675 2 жыл бұрын
I can't seem to get my player to move I'm at the 12:16 min mark and when i setup like in the video my player doesn't move. What am I doing wrong??
@yairyamagucci9059
@yairyamagucci9059 2 жыл бұрын
Hi! great tutorial everything worked up until 53:03 I tweaked the Unity Third Person Controller Asset code while following this, the bullets do not spawn when i run i get a error in the console that says NullReferenceException: Object reference not set to an instance of an object StarterAssets.ThirdPersonController.OnEnable () i think it's because the GameObject in their code references the Main Camera is there any way around this?
@buddyroach
@buddyroach 3 жыл бұрын
how do i make a third-person camera using cinemachine but for a rigid body player instead of a character controller?
@samyam
@samyam 3 жыл бұрын
The implementation for cinemachine should be the same, cinemachine just needs a Follow and/or Look At gameobject, how you handle the movement is up to you.
@maksukomski128
@maksukomski128 2 жыл бұрын
Hi, great tutorial, but i'm stuck at 30:12. When I add VCam Switch Component, It doesnt show me option to add Player Input. What should i do?
@samyam
@samyam 2 жыл бұрын
Did you make it a SerializeField & check if the script has any errors (Windows>General>Console)
@Joe-oq2zn
@Joe-oq2zn 2 жыл бұрын
same issue. have you got this resolved
@FacturedGaming
@FacturedGaming 2 жыл бұрын
Did anyone have a problem where the aiming camera for whatever reason did not follow the character from behind? I had encountered times where if my character would rotate around, the active camera will be correct, but the aiming camera would still be infront of the player and thus ADs would be incorrect
@acrostiic5623
@acrostiic5623 Жыл бұрын
Even a year later, this tutorial is the best I've seen. I watched 3 different hour long videos just to find that there was something about the end result that I didn't like. Not only is this easier, but more customizable. All the other videos I watched required so much code and not any way to change the way you move or the way the camera works. I figured out how to adjust the camera to an RPG game by changing the value range of the horizontal axis to 360 degrees rather than 180, allowing you to rotate fully around, enabling wrap, and then locking the cursor in the middle of the screen using the cursor lock state command. I can't express how helpful this tutorial was as a beginner to Unity and C#.
@acrostiic5623
@acrostiic5623 Жыл бұрын
Like seriously, I was about to give up any hopes of making a game but this was so easy to implement that it re-motivated me and now its 8am and I haven't slept xD
@ganeshwer6337
@ganeshwer6337 2 жыл бұрын
26:51 Anyone could help me out with why she didn't give lookat(aimCamera) as "Player Transform" ??
@zzz-hk9zq
@zzz-hk9zq 2 жыл бұрын
23:39 if anyone is having errors , try deleting line cameraTransform = Camera.main.transform; and instead of this use cameraTransform = GameObject.Find("*your camera name*").GetComponent();
@Ultimateroku
@Ultimateroku Ай бұрын
It's not working for me still
@Cazyman24
@Cazyman24 2 жыл бұрын
my camera is teleporting 180 degrees when i turn look left and right. do you have any reason why?
@Cazyman24
@Cazyman24 2 жыл бұрын
when it reaches the starting position of the camera it teleports 180 degrees
@Cazyman24
@Cazyman24 2 жыл бұрын
also the aim camera is shaking (noise is turned off)
@snowdrop890
@snowdrop890 3 жыл бұрын
Heya, I appreciate your help, Thank you very much , i will keep supporting you in a long run ^^
@samyam
@samyam 3 жыл бұрын
Thank you!!
@travisgarrisonihdlive
@travisgarrisonihdlive 2 ай бұрын
I found when the aim vcam becomes live it will not have the same rotation values as the current 3rd person vcam. To fix this select your aim vcam under Transitions check the box that says Inherit Position and now when the aim camera goes live it will have the same rotation values as the 3rd person vcam. You will also want to do this to the 3rd person vcam so when it becomes the live camera it will have the values from the current aim vcam.
@diggerfdf
@diggerfdf 2 жыл бұрын
First of all, Thanks for your amazing efforts to make these lovely tutorials! Please keep up the great work! I got a problem with the "Rotate towards camera direction" part. Following the code, there is the targetRotation variable. I got the error "The name 'targetRotation' does not exist in the current context". Where this variable is declared? If I place "private Quaternion targetRotation" as the variable declaration, the compile error vanishes, but the player still don't rotate towards the target...
@knowingph5802
@knowingph5802 2 жыл бұрын
same problem sir
@arkanth6313
@arkanth6313 2 жыл бұрын
on the line just above, the quatrernion have been renamed
@raineirlouisl.fetalino1509
@raineirlouisl.fetalino1509 2 жыл бұрын
same problem here, did you figure it out?
@1xMuchx1
@1xMuchx1 3 жыл бұрын
I have a problem that the player is moving slower while looking down. I am the only one encountering this problem? I dont really get it because all used vectors are normalized?? However still great content with amazing explanation
@samyam
@samyam 3 жыл бұрын
Thanks! That seems to happen because the vector is pointing down when moving and it is noticeable, try using a dummy gameobject that just uses the camera's euler y axis for the direction so it doesn't get the slow down forum.unity.com/threads/character-slows-down-when-looking-down-or-up.314746/
@raptordrawsstudios
@raptordrawsstudios 3 жыл бұрын
It says : “the type or namespace “playerInput” does not exist”. HELP!
@samyam
@samyam 3 жыл бұрын
playerInput should be the variable you declare. using UnityEngine.InputSystem; … private PlayerInput playerInput; … playerInput = GetComponent();
@raptordrawsstudios
@raptordrawsstudios 3 жыл бұрын
@@samyam Thx so much! I was super panicked. Earned yourself a sub!
@samyam
@samyam 3 жыл бұрын
Thank you!!
@rickeydigital
@rickeydigital 3 жыл бұрын
Efficient,detailed, useful, timely, straightforward and very well done.
@samyam
@samyam 3 жыл бұрын
Thank you!
@midnightwolf1902
@midnightwolf1902 3 жыл бұрын
I'm getting an error saying "targetRotation" doesn't exist in current context. I'm a total noob at coding so I have no idea what to do. Help please?
@samyam
@samyam 3 жыл бұрын
That probably means you didn’t declare the variable anywhere, because it can’t find it. Quaternion targetRotation - I changed the variable name from rotation to targetRotation in the video At 25:20
@midnightwolf1902
@midnightwolf1902 3 жыл бұрын
@@samyam Ohhh I'm so blind, wow. Yes I see it now. I accidentally left it at "Quarternion rotation". Sorry for wasting your time on my mistakes. Thank you for helping me. And thanks for the video! T_T
@samyam
@samyam 3 жыл бұрын
No worries!
@rajeevprakash5894
@rajeevprakash5894 7 ай бұрын
Omg i just getting fan of you,, you are amazing and i really comment and like very rarely😇😇😇
@lunner505
@lunner505 2 жыл бұрын
Marrry me 😂😂😂😂😂, daaamn she's good , now I can make my tps system hahahaha thank you bro$
@BenjaminKhadem
@BenjaminKhadem 4 ай бұрын
I appreciate the video, but personally I don't think I am really learning anything here. Maybe its too advanced for me, but you type your code at 250-300wpm, I get I can pause but it doesn't really help me understand when the explanations of how the code works is just as fast. Regardless thank you for the content.
@Hoptronics
@Hoptronics 4 ай бұрын
Play at 1/2 speed with closed captions on.
@dabbster2574
@dabbster2574 Жыл бұрын
I keep getting errors on the line/ private PlayerInput playerInput; / in the player controller not really sure how to fix it
@sahriarximato1398
@sahriarximato1398 2 жыл бұрын
Every ti a friend of mine ask to teach them how to use soft soft I share them the link to tNice tutorials YT video tNice tutorials helped so it will help
@jalop716
@jalop716 2 жыл бұрын
trance. Dude made a month worth of s before actually realizing what a plug-in is.
@goldduck924
@goldduck924 2 жыл бұрын
how did you change the GSM because if i add it it is just a long buzzzzzzzzzzzzzzzzzzzz but in your vid it is a short app plz help
@blzahz7633
@blzahz7633 2 жыл бұрын
I'm about 30 minutes in, and I gotta say that this is a very captivating tutorial. There are some things that get jumped over and needed some piecing together, for example at (17:15) to (18:57) "Look At" changes from Player to 3rdPerson, the same happens with Aim Camera at (25:59) - (26:10) 3rdPerson changes to AimCinemachine. (Though having these set to looking at themselves caused mad shaking, so I returned both to Player, let's see how that pans out - maybe this is why they got skipped over?) Then there's PlayerController.cs: you introduce Aim Action at the beginning of the video when creating PlayerControls (6:12), but don't really type it in the cs script at (11:09), yet refer to it at (27:35). This caused some confusion when Unity started screaming at me.
@samyam
@samyam 2 жыл бұрын
Thanks for the notes! I probably messed up during the video and switched the objects, and sometimes when editing I may miss a section by accident because I have to remove a lot of mistakes. I’ve been improving with more recent videos! :)
@blzahz7633
@blzahz7633 2 жыл бұрын
@@samyam Yea it happens, and it's okay. I think it's better to let the other person know when stuff like that happens - after all creating a tutorial is about sharing knowledge so we can all be better, something along the lines of: _"If we do our best, individually, then collectively we'll be awesome."_ Tutorials, comments - communication in general is a way to help each other to reach individual excellence. So keep it up, as you can see from the other comments, you are doing a good job.
@samyam
@samyam 2 жыл бұрын
@@blzahz7633 Thanks so much appreciate the nice comment :)
@akshhhatislive
@akshhhatislive 3 жыл бұрын
this was the best video which i watched in youtube thankyou so much
@samyam
@samyam 3 жыл бұрын
Thank you!! :D
@jdonaldsontcs
@jdonaldsontcs 3 жыл бұрын
Spectacular scope for this video. Very well done! Keep up the great work!
@samyam
@samyam 3 жыл бұрын
Thank you!
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 498 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 38 МЛН
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 67 МЛН
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 2 МЛН
Awesome Third Person Shooter Controller! (Unity Tutorial)
36:10
Code Monkey
Рет қаралды 543 М.
Bedrock. Why?!
22:37
FundyLIVE
Рет қаралды 430 М.
AI Learns to Run Faster than Usain Bolt | World Record
10:22
cozmouz
Рет қаралды 880 М.
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,4 МЛН
3rd Person Controller - Unity's New Input System
40:30
One Wheel Studio
Рет қаралды 84 М.
How to make The Best First Person Camera in Unity
9:04
semikoder
Рет қаралды 12 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 38 МЛН