FIRST PERSON MOVEMENT in Unity - FPS Controller

  Рет қаралды 3,234,880

Brackeys

Brackeys

4 жыл бұрын

Let's see how to get an FPS Character Controller up and running in no time!
REGISTER with APPTUTTI: www.apptutti.com/partners/reg...
LEARN MORE: www.apptutti.com/corporate/?u...
● Ultimate FPS asset: assetstore.unity.com/packages...
● New Input System: • NEW INPUT SYSTEM in Unity
● FPS Shooting: • Shooting with Raycasts...
····················································································
❤️ Donate: www.paypal.com/donate/?hosted...
► Join Discord: / discord
● Website: brackeys.com/
● Twitter: / brackeystweet
● Instagram: / brackeysteam
········································­­·······································­·­····
► All content by Brackeys is 100% free. We believe that education should be available for everyone.
❤️ Donate: www.paypal.com/donate/?hosted...
········································­­·······································­·­····
♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound

Пікірлер: 14 000
@Danidev
@Danidev 4 жыл бұрын
Yeeey you're finally back! Been waiting for this one! :DDD
@pharmacist66
@pharmacist66 4 жыл бұрын
Dani Man you’re fast I just got the notification
@crowgaming7156
@crowgaming7156 4 жыл бұрын
hi
@Beengus
@Beengus 4 жыл бұрын
WHERES MY MOBILE PORTS NERD
@user-ob5hj5vn8c
@user-ob5hj5vn8c 4 жыл бұрын
Dani your the man, keep up your devlogs my dude.
@AB-hr4qg
@AB-hr4qg 4 жыл бұрын
I played karlson for 2 hours .... idk why
@godot-boy7694
@godot-boy7694 3 жыл бұрын
Mr. Brackeys we noobs will always respect you as our teacher. You left KZfaq but you cannot leave our hearts, sir.
@BluePhantomGames
@BluePhantomGames 3 жыл бұрын
why is he not responding?
@zaimy5779
@zaimy5779 3 жыл бұрын
*salut*
@jacobbern9591
@jacobbern9591 3 жыл бұрын
may he teach us trough eventually out dated videos
@vozzy06
@vozzy06 3 жыл бұрын
Yash :The Gaming Boy i think he didnt look up his youtube page again
@sandroalderucci7949
@sandroalderucci7949 3 жыл бұрын
amen
@bonestudios7777
@bonestudios7777 7 ай бұрын
4 years in and this is one of the best movement tutorial that I found out there
@Iwan._
@Iwan._ Ай бұрын
I found it once and use it every time till today
@zeroplayz5525
@zeroplayz5525 Жыл бұрын
Brackey is a legend. I followed 6 different tutorials in order to make a first person controller, I was starting to give up until I remembered your channel and I followed this video. You are the reason why I haven’t given up game development. Thank you.❤
@donalodomhnaill
@donalodomhnaill 11 ай бұрын
Exactly the same here!
@FYFTYNDIGITSLoF
@FYFTYNDIGITSLoF 4 ай бұрын
I have been searching for ages to find a good movement, I am acutaly saying this as unity is loading so I have faith but idk
@letthatbe
@letthatbe 2 ай бұрын
But you have given up right? :D
@FYFTYNDIGITSLoF
@FYFTYNDIGITSLoF 2 ай бұрын
@@letthatbe nope
@nebuluhgaming
@nebuluhgaming Ай бұрын
This doesn't work for me. The code shown at 10:19 is not working for me. Unity says "The name "Qauternion" does not exist in the current context"
@whugnong
@whugnong 4 жыл бұрын
me: trying to slowly and methodically type out a script. brackeys: I AM SPEED.
@StarzzDrak
@StarzzDrak 4 жыл бұрын
bruh i have the same problem except i need to set video speed to 1.25 :D
@stupidrobot7386
@stupidrobot7386 4 жыл бұрын
StarzzDrak good for you but.... we didn’t need to know that
@StarzzDrak
@StarzzDrak 4 жыл бұрын
@@stupidrobot7386 yes but its life struggle for both of us.. that was the point
@SwedishVikingMC
@SwedishVikingMC 4 жыл бұрын
@@StarzzDrak Why are you watching a beginner tutorial if you're a more experienced programmer? lol
@StarzzDrak
@StarzzDrak 4 жыл бұрын
@@SwedishVikingMCbruh why not ? I haven't created a single 3d character controller in 3 years
@redliam5
@redliam5 4 жыл бұрын
I think Brackeys is psychic, EVERY SINGLE TIME I am going to start a project, he does a tutorial on the exact type of game it is.
@zerogaminghq5430
@zerogaminghq5430 4 жыл бұрын
Similar! I think huh what if bracket did first per- New video 🤔
@thellamawaffle6817
@thellamawaffle6817 4 жыл бұрын
yeah! what is up with that..?
@lurtztheorc
@lurtztheorc 4 жыл бұрын
TheLlamaWaffle He has secretly implanted mind reading devices in our brains through us watching his vids. He then uses unity to see what we want.
@Gamer-uf1kl
@Gamer-uf1kl 4 жыл бұрын
I am new here so the most types of game i make are here
@catacylist2933
@catacylist2933 4 жыл бұрын
What if brackets did a mech game tutorial
@stefaniebowles9401
@stefaniebowles9401 Жыл бұрын
For sure one of the best Unity how-to’s I’ve come across. You break it down so well and make it easy to follow and understand. Definitely subscribing - thanks!
@RiftCuber01
@RiftCuber01 2 жыл бұрын
Really concise, this is the best fps programming tutorial I have seen so far!
@None-nh3xb
@None-nh3xb 4 жыл бұрын
4:51 Mouse Controls 11:13 Key Controls 15:14 Gravity 21:21 Jumping
@ANZARIZ_43
@ANZARIZ_43 4 жыл бұрын
thanks
@kepleda
@kepleda 4 жыл бұрын
Let's Make This The Top Comment
@aprameyanaganur2934
@aprameyanaganur2934 4 жыл бұрын
Nice. Pin this comment Brackeys!
@thereaper5847
@thereaper5847 4 жыл бұрын
BRACKEY PIN THIS
@thereaper5847
@thereaper5847 4 жыл бұрын
Who just liked my comment
@SrStakeholder
@SrStakeholder 4 жыл бұрын
I heard that Bethesda offices doesn’t have doors, the staff just clip trough the walls.
@mfatihbilhaq4977
@mfatihbilhaq4977 4 жыл бұрын
Yep that required 100$/year.
@SubjektDelta
@SubjektDelta 4 жыл бұрын
@ yes you are, not joking.
@skaruts
@skaruts 4 жыл бұрын
lol you made my day. :D
@rakodoza7601
@rakodoza7601 4 жыл бұрын
@@skaruts "People will buy everything" - Todd 2018
@Cxdyy
@Cxdyy 4 жыл бұрын
Lmaoooooooooooooooooooooooooooooooooooooooooooooooo
@bernardmasika
@bernardmasika Жыл бұрын
brackeys explains things with diagrams before starting to demonstrate, such a gem. this tutorial still make sense up to today, well apart the fact that you will have to consider using the new input system. Thanks a lot! i just hope you will be back one day, in publishing tutorials
@amanewithjesus5244
@amanewithjesus5244 Жыл бұрын
Jesus is lord follow him and you will be saved
@Yoctopory
@Yoctopory Жыл бұрын
@@amanewithjesus5244 What's wrong with you?
@phillipdean9830
@phillipdean9830 Жыл бұрын
Worked perfectly after a few hiccups (probably on my end). So much better explained and implemented compared to this other tutorial I followed. Highly recommended!
@zacoriot
@zacoriot 4 жыл бұрын
Me: *Runs into an error* Me: *Stairs blankly at my code* Brain: "Just look up the error on google" Me: *continues to stair blankly at my code* Brain: "JUST LOOK IT UP" Me: "Yeah. your right... Time for a new project"
@user-hf6os1qb2w
@user-hf6os1qb2w 4 жыл бұрын
I dunno if you will find it helpfull but with F5 you can run the code and in bottom console it will show you errors
@bobdagamer640
@bobdagamer640 4 жыл бұрын
Alt + f4 I believe is good
@yeahnope2349
@yeahnope2349 4 жыл бұрын
@@bobdagamer640 For a split second, i went "Huh I didn't know they could do tha-- wait a second...
@bobdagamer640
@bobdagamer640 4 жыл бұрын
Lol
@kortenue
@kortenue 4 жыл бұрын
I forgot a comma when that almost happened
@thewatermelon_thing7083
@thewatermelon_thing7083 3 жыл бұрын
Unity: "No errors detected!" Me: Falling through the ground at 5000 miles per hour.
@p4tk47
@p4tk47 3 жыл бұрын
Unity: "No Errors detected" Me: Jump, no :(
@leonardpertsch8784
@leonardpertsch8784 3 жыл бұрын
@@p4tk47 same. did you fix it?
@hamoodibtw5550
@hamoodibtw5550 3 жыл бұрын
how to fix?
@skphotography6982
@skphotography6982 3 жыл бұрын
@@p4tk47 SAME
@francomarini6311
@francomarini6311 3 жыл бұрын
do you have a terrain or a plane with a collider on it?
@pugwilldestroygaming9769
@pugwilldestroygaming9769 Жыл бұрын
this tutorial is amazing. im making a game where you explore mars and find aliens and stuff but couldn't figure out how to jump, i ended up using the first part of the tutorial as a "jetpack" and calling it a day
@everydayisntnormal6945
@everydayisntnormal6945 Жыл бұрын
wow
@IamDrDapper
@IamDrDapper Жыл бұрын
Genius
@BreadAckerman
@BreadAckerman Жыл бұрын
God damn it he must not live he possesses the "i will improvise" strategy.
@fluberdebluber7566
@fluberdebluber7566 2 ай бұрын
Im totally fresh to this, and when all the other tutorials buried me in errors this one was a saving grace! Thank you so much!
@AlexandruAlexe07
@AlexandruAlexe07 3 жыл бұрын
me: I will do this by myself also me at 12 am: Brackeys tutorial fps movement
@labscience8271
@labscience8271 3 жыл бұрын
Hahahha same. I'm a noob. I can't do it without Brackeys
@cubecraftgaming9669
@cubecraftgaming9669 3 жыл бұрын
@@labscience8271 Im pretty good at coding, so I tried myself, but 2 days later, 7 cups of coffee drank, and a dead heart, I came to this and it worked! 😁
@casssaph2287
@casssaph2287 3 жыл бұрын
me: sees "quaternion" me: "ok so basically its black magic and i dont need to know how it works"
@youneskasdi
@youneskasdi 3 жыл бұрын
It is in fact one of the coplex parts of game dev you are better off not diging into it if you don't want your head to hurt
@dzvidea5065
@dzvidea5065 3 жыл бұрын
@@youneskasdi i did an oopsie... i dug into it you weren't wrong, my head hurts
@scorpoinlol97
@scorpoinlol97 3 жыл бұрын
@@dzvidea5065 same here
@thealgomanxr
@thealgomanxr 3 жыл бұрын
@@youneskasdi I read an article about it and understand absolutely nothing
@copperwires9663
@copperwires9663 3 жыл бұрын
I think it's a way of showing positioning on a 4 dimensional axis, which is why it can be used to shoe rotation and position in 3d games
@random_guy-rz8vz
@random_guy-rz8vz 5 ай бұрын
I'm making a third person controller with the new Input System and Cinemachine. I finally figured out basic movement but I had no clue how to add jump and gravity mechanics. Your method worked perfectly. Thanks mate!
@hmmmmm8716
@hmmmmm8716 Жыл бұрын
My first in-game code ever written, I did complete an online course of C# so I get the basic stuff and some advanced stuff but application in the engine is beyond me. Super helpful tutorial, very happy I found this, Thank You!!!!
@SyncroxDeeznuts
@SyncroxDeeznuts Жыл бұрын
Make sure you add the camera as a child object to the player
@vasatruhl
@vasatruhl Жыл бұрын
Brackeys is a life saver :D
@kieranwiggy2522
@kieranwiggy2522 4 жыл бұрын
Everyone is back here since we are all in quarantine
@Dom4321
@Dom4321 4 жыл бұрын
Hell Yeah
@unclerandy398
@unclerandy398 4 жыл бұрын
yup
@voicehead
@voicehead 4 жыл бұрын
oh yeah
@julianeyt4059
@julianeyt4059 4 жыл бұрын
after this is over we will have millions of new game developer XD
@aquah2080
@aquah2080 4 жыл бұрын
TF, i just realized i got inspired for gamemaking just because i have too much time with my laptop since the quarantine. Thank you for opening my eyes
@Yoctopory
@Yoctopory 3 жыл бұрын
God creating the universe: "..and of course let's multiply with Time.deltaTime".
@marshgd
@marshgd 3 жыл бұрын
lol
@vaglo701
@vaglo701 3 жыл бұрын
underrated xd
@otsutsuki.7653
@otsutsuki.7653 3 жыл бұрын
HAHAHAHA
@Aries-tp8sk
@Aries-tp8sk 3 жыл бұрын
69th like
@Yoctopory
@Yoctopory 3 жыл бұрын
@@Aries-tp8sk nice ;)
@Phniblet
@Phniblet Жыл бұрын
The best general unity player movement tutorial on youtube!
@Tryftz
@Tryftz Жыл бұрын
Thank you so much Brackeys, your videos are very awesome and helpful and you explain very well what your teaching your students ♥
@connorkerrigan3582
@connorkerrigan3582 4 жыл бұрын
i laughed so hard when my guy slowly started floating up into the sky
@rexss90
@rexss90 4 жыл бұрын
i have the same problem, can't seem to get the guy on the ground. He either shoots sideways extremely fast or floats
@nautics9927
@nautics9927 4 жыл бұрын
@@rexss90 go into your player and make sure the gravity is negative
@rexss90
@rexss90 4 жыл бұрын
@@nautics9927 Thanks, i figured it out finally!
@CrazyJoven
@CrazyJoven 4 жыл бұрын
@@nautics9927 THANK YOU!!
@nautics9927
@nautics9927 4 жыл бұрын
@@CrazyJoven no problem
@sykoo
@sykoo 4 жыл бұрын
That terrain in the thumbnail is 10/10! Thought it was RTX Minecraft, then it started looking like a delicious cake with moss on top of it :P Also, welcome back my dude!
@theonlyasher
@theonlyasher 3 жыл бұрын
Sykooooooooooooooooooo
@thecomputez-gaming8427
@thecomputez-gaming8427 3 жыл бұрын
@AlanTheGamerWolf wdym sykoo is lit
@age9502
@age9502 3 жыл бұрын
Only 3 comment
@iantakacs8771
@iantakacs8771 3 жыл бұрын
mmmm moss cake
@jeremiahruiz9686
@jeremiahruiz9686 3 жыл бұрын
the best level creator
@fearedwolf1731
@fearedwolf1731 2 жыл бұрын
Brackeys I almost quit watching you becuase I thought unity cost money but now im back and realised your my best source of knowlage.
@gaurang3586
@gaurang3586 2 жыл бұрын
YOUR ASSETS ARE AWESOME JUST LIKE YOUR TUTORIALS
@basilbravo6361
@basilbravo6361 3 жыл бұрын
me: types the code and follows each step carefully. unity: 249 errors take it or leave it.
@Mr-px4nz
@Mr-px4nz 3 жыл бұрын
I also have such a problem. Can anyone help with that? :(
@tverroryt
@tverroryt 3 жыл бұрын
@Liftnop i have so much erors
@sembos1151
@sembos1151 3 жыл бұрын
@@Mr-px4nz using System.Collections; using System.Collections.Generic; using UnityEngine; public class movement : MonoBehaviour { public float mouseSensitivity = 100f; public Transform playerbody; float xRotation = 0f; // Start is called before the first frame update void Start() { Cursor.lockState = CursorLockMode.Locked; } // Update is called once per frame void Update() { float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime; float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity * Time.deltaTime; xRotation -= mouseY; xRotation = Mathf.Clamp(xRotation, -90f, 90f); transform.localRotation = Quaternion.Euler(xRotation, 0f, 0f); playerbody.Rotate(Vector3.up * mouseX); } }
@youtubespyder4389
@youtubespyder4389 3 жыл бұрын
dude thats something thats weird
@arandomeditor972
@arandomeditor972 3 жыл бұрын
Pls help I followed all the steps but it says file missing when I try to add movement
@magicdragon3725
@magicdragon3725 3 жыл бұрын
When you're like, "What's wrong, nothing is showing up" but you forgot to save.
@kylu5416
@kylu5416 3 жыл бұрын
Or when you forgot to put a semicolon at the end of a line of code
@thespeediestgonzales7704
@thespeediestgonzales7704 3 жыл бұрын
@@kylu5416 or when you accidentally write code after a semicolon and leave it there in addition to a semicolon at the end
@alphaa2182
@alphaa2182 3 жыл бұрын
@@thespeediestgonzales7704 Or when you forgetting the multiplication dash adjacent to the vector
@willgamer101dondon7
@willgamer101dondon7 3 жыл бұрын
THAT WAS MY ISSUE THANK YOU SO MUCH
@magicdragon3725
@magicdragon3725 3 жыл бұрын
@@willgamer101dondon7 np
@arkilusreal
@arkilusreal 2 жыл бұрын
for whoever needs it, at 10:30, if you are having problems and your mouse is moving very little, go into Main Camera, go on the right side where it says Inspector and go down to the bottom to where it says Mouse Sensitivity and change that to 1000 or how much you are comfortable with. you're welcome
@etannn
@etannn 2 жыл бұрын
Thanks bro
@arkilusreal
@arkilusreal 2 жыл бұрын
@@etannn no probs
@DiegoValenciabajista
@DiegoValenciabajista 2 жыл бұрын
Ey bro, my cursor is still visible even tho I put the Cursor code at the start void. Do you know why?
@arkilusreal
@arkilusreal 2 жыл бұрын
im so sorry dude i watched this like a month ago so i have no idea lol. But ill try to find out why
@DiegoValenciabajista
@DiegoValenciabajista 2 жыл бұрын
@@arkilusreal its ok, actually I figure it out. Thank you very much for responding!
@LaithGhandour-iz2ps
@LaithGhandour-iz2ps Ай бұрын
literally worked perfect first try and everything makes sense, you got me excited for my upcoming physics class
@xrotator8986
@xrotator8986 4 жыл бұрын
me: *watches the video 5 separate times and remembers something* me again : *types it before brackeys says anything about it* my brain : I am five universes ahead of you
@h.k654
@h.k654 4 жыл бұрын
Can anyone help me?Whenever I press spacebar the player doesnt do anything.I can move and look around though.
@FaruukNN
@FaruukNN 3 жыл бұрын
@@h.k654 you should check your groundcheck :d
@nietzsche14
@nietzsche14 3 жыл бұрын
Me acting like I understand and am not just copying everything he is doing. "mhmmmm"
@davez2796
@davez2796 3 жыл бұрын
hhahhahah same
@sillymortalz
@sillymortalz 3 жыл бұрын
It’s weird, because the third person video’s method or script was so confusing and unknown to me but this one all makes sense?
@cubecraftgaming9669
@cubecraftgaming9669 3 жыл бұрын
@@sillymortalz Same XD
@lakshyakumar4459
@lakshyakumar4459 3 жыл бұрын
please help my code isnt working
@lakshyakumar4459
@lakshyakumar4459 3 жыл бұрын
if once i added the ycode for it to move p and down only that worked it stopped looking aroud i reallycant explain
@MemesChannel7531
@MemesChannel7531 10 ай бұрын
The Fact That I Learned 3D Movement Script. YOU ARE JUST AWESOME
@aleksiszaps8423
@aleksiszaps8423 2 жыл бұрын
its realy nice that u explain everything unlike some other youtubers- i just hate it when they start typing with the speed of sound, say nothing abaut what they did and end the vid
@fabioeditz8430
@fabioeditz8430 4 жыл бұрын
Me: Copies perfectly Unity: 964 ERRORS
@aravind.s1187
@aravind.s1187 3 жыл бұрын
LOL
@TKTC_The_Key
@TKTC_The_Key 3 жыл бұрын
Only?
@fabioeditz8430
@fabioeditz8430 3 жыл бұрын
@@TKTC_The_Key Yea!. Im just good like that.
@faynon8765
@faynon8765 3 жыл бұрын
you forget the dot '-'
@tfeak2101
@tfeak2101 3 жыл бұрын
don't just blandly copy from it try learn and understand what he is doing so you can apply it again next time, otherwise whats the point.
@markiyeee
@markiyeee 4 жыл бұрын
me: following every step he makes The Word/letter color: is different me: there's something wrong I can feel it
@mage3690
@mage3690 4 жыл бұрын
Could be the highlight settings. Those have probably changed in the many updates since then. Unless it's not highlighting at all, in which case you or someone has turned them off, or the code straight up doesn't work.
@nevetsmahgnirtle8961
@nevetsmahgnirtle8961 4 жыл бұрын
The way I do these tutorials is to watch them a couple of times then enter the script line by line, compiling and running as I go. He has a bewildering habit of backtracking and adding code later on which some may find instructive (not me). I wait 'til the whole script is there then enter each line and test it. Voila! No errors!
@Gregory_12
@Gregory_12 4 жыл бұрын
imagine A third-person game, but it's a first-person game
@isaacsworld1177
@isaacsworld1177 4 жыл бұрын
😒
@oscarfacecamplz8264
@oscarfacecamplz8264 4 жыл бұрын
If it in color. What happens I’m new to Unity please help me it says when I hit play remove the compiler errors.
@kahuisswag
@kahuisswag Жыл бұрын
The video we've all needed at one point
@AndyGun11
@AndyGun11 2 жыл бұрын
Thank you Brackeys! I just started Unity, and these tutorials are amazing! :DD
@McCrazyDude950
@McCrazyDude950 2 жыл бұрын
if you finished the code and it worked, quick question: im at 9:40 in the video and im getting a few errors on line 27 (xRotation Mathf.Clamp(xRotation, -90f, 90f); ). when i save the script to unity, it tells me that ; and a , have to be placed some where, and i found where i needed to put it, but it gave even more errors. did line 27 work for you?
@McCrazyDude950
@McCrazyDude950 2 жыл бұрын
if it did, please tell me what i couldve done wrong
@AndyGun11
@AndyGun11 Жыл бұрын
@@McCrazyDude950 uh.. My best advice here is to just restart the tutorial.
@MathRavn
@MathRavn 3 жыл бұрын
This is the most relatable comment section I've ever seen
@akki3535
@akki3535 3 жыл бұрын
I agree lol
@oakamaam
@oakamaam 3 жыл бұрын
reletable :0
@MathRavn
@MathRavn 3 жыл бұрын
@@oakamaam ?
@bumewsa1483
@bumewsa1483 3 жыл бұрын
BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM BUM
@foshe
@foshe 3 жыл бұрын
Hi hi, im no
@viola_case
@viola_case 2 жыл бұрын
Brackeys tutorials will always be my go-to because his smile makes me feel welcome and ready to learn.
@josephjohn9215
@josephjohn9215 2 жыл бұрын
my camera is not rotating instead player is moving in the x axis when i move the mouse, what do i do
@viola_case
@viola_case 2 жыл бұрын
@@josephjohn9215 I think you meant to put this in the main video thread? I don't know how to fix your problem.
@josephjohn9215
@josephjohn9215 2 жыл бұрын
@@viola_case thank you, but someone else helped me
@Couldbeme
@Couldbeme 2 жыл бұрын
@@josephjohn9215 what'd they say
@josephjohn9215
@josephjohn9215 2 жыл бұрын
@@Couldbeme I didn't put the main camera in the playerlookscript in the inspector so it moved the player instead of the camera ( I think )
@taylor_3d
@taylor_3d Жыл бұрын
That's the gravy! Finally found an answer to the isGrounded issue! Great job!
@Aragos207
@Aragos207 Жыл бұрын
Thanks Brackeys, really good explaining everything!
@maxdukhovskoy1406
@maxdukhovskoy1406 3 жыл бұрын
Me: "ok, I copied this perfectly, it should work..." Unity: nah, we don't do that here.
@kanesiajones4407
@kanesiajones4407 3 жыл бұрын
Use 2019.4 either that or your a lire
@azzy1220
@azzy1220 3 жыл бұрын
@@kanesiajones4407 r/woooosh
@mohamed-nx8ll
@mohamed-nx8ll 3 жыл бұрын
@@kanesiajones4407 r/woooosh
@jihannireshwalia7603
@jihannireshwalia7603 3 жыл бұрын
@@kanesiajones4407 r/woooosh
@whoisthisuserthough
@whoisthisuserthough 3 жыл бұрын
@@kanesiajones4407 r/woooosh
@alariccollado3236
@alariccollado3236 2 жыл бұрын
If anyone is having issues with the line involving "MathF", its "Mathf" now. Hope this helps!
@alexbrooks128
@alexbrooks128 2 жыл бұрын
@nostalgia television just tryna help bro chill
@cakedon
@cakedon 2 жыл бұрын
That one Unity programmer that changed MathF to Mathf and earned 1000$ for it
@psytf2
@psytf2 2 жыл бұрын
@nostalgia television sounds like you're trying to sound smart
@kapex6405
@kapex6405 Жыл бұрын
Mmovement: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { public CharacterController controller; public float speed = 12f; public float gravity = -9.81f; public float jump = 1f; public Transform groundCheck; public float groundDistance = 0.4f; public LayerMask groundMask; Vector3 velocity; bool isGrounded; // Update is called once per frame void Update() { isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask); if(isGrounded && velocity.y < 0) { velocity.y = -2f; } float x = Input.GetAxis("Horizontal"); float z = Input.GetAxis("Vertical"); Vector3 move = transform.right * x + transform.forward * z; controller.Move(move * speed * Time.deltaTime); if(Input.GetButtonDown("Jump") && isGrounded) { velocity.y = Mathf.Sqrt(jump * -2f * gravity); } velocity.y += gravity * Time.deltaTime; controller.Move(velocity * Time.deltaTime); } } Mouse Look: using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouseLook : MonoBehaviour { public float mouseSensitivity = 100f; public Transform playerBody; float xRotation = 0f; // Start is called before the first frame update void Start() { Cursor.lockState = CursorLockMode.Locked; } // Update is called once per frame void Update() { float MouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime; float MouseY = Input.GetAxis("Mouse Y") * mouseSensitivity * Time.deltaTime; xRotation -= MouseY; xRotation = Mathf.Clamp(xRotation, -90f, 90f); transform.localRotation = Quaternion.Euler(xRotation, 0f, 0f); playerBody.Rotate(Vector3.up * MouseX); } }
@Termosulboreas
@Termosulboreas Жыл бұрын
legend
@Termosulboreas
@Termosulboreas Жыл бұрын
@Trupnup [GD] some heroes don't wear capes
@Pepagg8
@Pepagg8 Жыл бұрын
this script makes the entire character look down not just the camera thus moving the groundcheck so you cant jump when looking down
@Termosulboreas
@Termosulboreas Жыл бұрын
@@Pepagg8 not important
@volk4342
@volk4342 Жыл бұрын
If you wanna learn don’t copy this
@rasmuus10
@rasmuus10 7 ай бұрын
This tutorial has helped me so much. Everything works perfectly
@georgebooth6441
@georgebooth6441 3 жыл бұрын
Me: Gravity doesn't work. Me: "Alright I'll continue in about 3 years,"
@tinsku332Xd
@tinsku332Xd 3 жыл бұрын
@Torben Kauth it worked for me
@jayjayjay-er9ex
@jayjayjay-er9ex 3 жыл бұрын
@@tinsku332Xd i can't get it to work. whenever i jump it doesn't work and turns off the gravity. any tips or code i could use?
@tinsku332Xd
@tinsku332Xd 3 жыл бұрын
@@jayjayjay-er9ex this should work using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { public CharacterController controller; public float speed = 12f; public float gravity = -9.81f; public float jumpHeight = 3f; public Transform groundCheck; public float groundDistance = 0.4f; public LayerMask groundMask; Vector3 velocity; bool isGrounded; // Update is called once per frame void Update() { isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask); if(isGrounded && velocity.y < 0) { velocity.y = -2f; } float x = Input.GetAxis("Horizontal"); float z = Input.GetAxis("Vertical"); Vector3 move = transform.right * x + transform.forward * z; controller.Move(move * speed * Time.deltaTime); if(Input.GetButtonDown("Jump") && isGrounded) { velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity); } velocity.y += gravity *Time.deltaTime; controller.Move(velocity * Time.deltaTime); } }
@jayjayjay-er9ex
@jayjayjay-er9ex 3 жыл бұрын
@@tinsku332Xd thank you sososososososososo much
@jayjayjay-er9ex
@jayjayjay-er9ex 3 жыл бұрын
@@tinsku332Xd i copied and pasted your code but no luck. same as before :(
@RichWilx
@RichWilx 3 жыл бұрын
Good tut! The physics stuff is cool and it's interesting to see how "real" physics isn't quite what we expect in games.
@Whopper3
@Whopper3 2 жыл бұрын
Thank you so much. This helps me fine a starting point and commit to making a game
@kabirshingh7521
@kabirshingh7521 2 жыл бұрын
Thanks so much, sir! It helped me a lot in learning Unity I am a beginner so it is helpful for me and easy to understand BTW new sub 😃
@bigusdickus7866
@bigusdickus7866 3 жыл бұрын
Me: sees different colours in the script on my screen than his screen Also me:I recon this ain't workin
@Charduza
@Charduza 3 жыл бұрын
lol different colors dont matter
@bigusdickus7866
@bigusdickus7866 3 жыл бұрын
@@Charduza I am boomer, I feel embrassed
@jacobmars1902
@jacobmars1902 3 жыл бұрын
@@bigusdickus7866 I used to think that as well, don’t worry
@tryfle3461
@tryfle3461 3 жыл бұрын
For some reason it won't let me code do you know why that is? Do I have to download something other than unity?
@jacobmars1902
@jacobmars1902 3 жыл бұрын
@@tryfle3461 download the unity tools package for your IDE
@paynesmells
@paynesmells 3 жыл бұрын
Me: Movement doesn't work. Me: Looks for the error in the script. My Brain: Everything is correct! Me: Sees that the script isn't even enabled.
@frindjinny6
@frindjinny6 3 жыл бұрын
where do i pu tthe comma it wants me to put a comma WHERE IS IT AAAAAAAAAA
@snoutgames4940
@snoutgames4940 3 жыл бұрын
i've done that so much lol
@TinyDeskEngineer
@TinyDeskEngineer 3 жыл бұрын
Meanwhile I'm not even using a version of Unity which supports the input system used in the video. And the video on the new input system seems to be outdated as well.
@oFox_
@oFox_ 3 жыл бұрын
ctrl s am i joke to you
@thewindowgames2610
@thewindowgames2610 3 жыл бұрын
Dang, I hate when that happens
@DanyVeilleux
@DanyVeilleux Жыл бұрын
thanks brackeys you're the best for showing us that. seriously thank you
@Deadcatconversation
@Deadcatconversation 2 ай бұрын
Thanks this tutorial is exacly what i was lookig for a simple and customizable playerController
@datblue1104
@datblue1104 3 жыл бұрын
Brackeys: "And now we should be able to move around" My Character: " *_YEET gdf bngrsdts ytnw eaygfdfgbv_* "
@eddybplayz4801
@eddybplayz4801 3 жыл бұрын
@DRAGO YT GAMING using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { public CharacterController controller; public float speed = 50f; public float gravity = -9.81f; Vector3 velocity; // Update is called once per frame void Update() { float x = Input.GetAxis("Horizontal"); float z = Input.GetAxis("Vertical"); Vector3 move = transform.right * x + transform.forward * z; controller.Move(move * speed * Time.deltaTime); velocity.y += gravity * Time.deltaTime; controller.Move(velocity * Time.deltaTime); } } paste this in mate, see if it works. i think you might need to change a bit tho
@aheavyofculture
@aheavyofculture 3 жыл бұрын
@DRAGO YT GAMING Why do you use a capital at the start of every word?
@nutellacheese6017
@nutellacheese6017 3 жыл бұрын
Lolol
@user-ji3tc7ut8k
@user-ji3tc7ut8k 3 жыл бұрын
@@aheavyofculture C# is cap sensitive
@aheavyofculture
@aheavyofculture 3 жыл бұрын
@@user-ji3tc7ut8k so?
@labscience8271
@labscience8271 3 жыл бұрын
Major parts for quick access: 00:01 - 02:49 Intro & Explanation 02:50 - 10:40 Camera Movement & Look around 10:41 - 22:50 Player Movement & Gravity 22:50 - 23:50 Outro Thank you Brackeys I miss you :(
@Boogaloo69
@Boogaloo69 3 жыл бұрын
Same bro :(
@frostblock_12
@frostblock_12 2 жыл бұрын
thanks my dude
@MMithy
@MMithy 2 жыл бұрын
@@Boogaloo69 same :(
@yourmum69_420
@yourmum69_420 2 жыл бұрын
hey can anyone help me please? When I added controller support my camera spins around like crazy and I don't know why
@Bigmanjeff69
@Bigmanjeff69 2 жыл бұрын
Thanks for this bro
@ThunderPlayStudios
@ThunderPlayStudios 2 жыл бұрын
in love with your tutorials man
@LegndGames_YT
@LegndGames_YT 4 жыл бұрын
Great tutorial as always! I might be wrong, but I think you are making a misstake by applying delta time to the mouse input. The reason for this is that the mouse input you are receiving is already a delta value.. It is already the amount you have moved that frame! The mouse is an asynchronous input device. So it's position value already changes over time, not per frame! Upvote for awareness :) Also if I'm wrong with any of my claims, please let me know for my own educational purpose. Peace!
@pepijnvb1484
@pepijnvb1484 4 жыл бұрын
Thanks for the tip, it removed the stuttering for me!
@LegndGames_YT
@LegndGames_YT 4 жыл бұрын
@@pepijnvb1484 No problem! Glad to help :)
@karter6632
@karter6632 4 жыл бұрын
@@LegndGames_YT how do i do this
@karter6632
@karter6632 4 жыл бұрын
@@LegndGames_YT how do i do this
@LegndGames_YT
@LegndGames_YT 4 жыл бұрын
@@karter6632 Simply remove Time.deltaTime from the MouseLook script :)
@susseratal
@susseratal 4 жыл бұрын
7:26 I love how you can learn how to not tie framerates to game speed in the first tutorial on indie development, but Bethesda couldn't do that in their fully priced, AAA title
@Lumiobyte
@Lumiobyte 4 жыл бұрын
@@speedyturtle1537 why are you spamming that everywhere
@user-un5xj1wl6p
@user-un5xj1wl6p 4 жыл бұрын
Idk... they have much bigger problems... like they aren't even using an engine comparable to unity... it's more comparable to quake ...
@jamieboer3466
@jamieboer3466 4 жыл бұрын
Its much different in Unity vs other engines, plus for larger games they generally have to create their own solutions for this anyway as a lot of unity's solutions are not perfect.
@user-un5xj1wl6p
@user-un5xj1wl6p 4 жыл бұрын
@@jamieboer3466 yeah no solution is perfect... but bethesda's cration engine is... an artefact... their previous gamebryo was so-sk back then... but gamebryo is not aimed at modern AAA
@Lmao-ke9lq
@Lmao-ke9lq 2 жыл бұрын
the most funny thing is, that by multiplying mouseX/Y by Time.DeltaTime actually makes sensitivity frame rate dependent, because its already done by default, so this video is wrong, you can test it by setting framerate to 10 fps and then to 1000 fps and see that sensitivy is different if you multiple by Time.DeltaTime, remove it
@Youngstupidkid
@Youngstupidkid Жыл бұрын
I love this tutorial!! I also love all the people who are helping in the comments, great video, great audience, thank you all!
@gregorvalusso629
@gregorvalusso629 2 жыл бұрын
You helped me a lot. Thanks so much!
@no8053
@no8053 4 жыл бұрын
One of the most satisfying parts about coding is when you successfully debug something eventhough it was just a small error like forgetting one cast or something
@kingkodo7184
@kingkodo7184 4 жыл бұрын
Decent tutorial to get beginners started in the right direction. However, there are at least 2 things i think you should have addressed! 1.) Trying to jump onto something can cause a stutter/jitter effect because the slope limit(it should be adjusted when you jump and then readjusted when you land) and 2.) If an object is above the character when they jump, the character will still jump and continue to move against the object.(This would have been a good time to introduce collision flags) EDIT: Also, the movement vector isn't normalized, resulting in an increased speed if moving at a diagonal angle.
@Brackeys
@Brackeys 4 жыл бұрын
Definitely agree that these additions would make the character controller even more solid! I didn't encounter these problems in my test scene but I can of course see cases where this would be good to add :-) Thanks for pointing this out so that people can add this to their scripts!
@tamaskisely9122
@tamaskisely9122 4 жыл бұрын
Could somebody please be more specific? ( I mean explain this in a more detailed way) Thanks
@equation1321
@equation1321 4 жыл бұрын
Hello
@llakuawyus7326
@llakuawyus7326 4 жыл бұрын
@@tamaskisely9122 Yeah a bit more detail would help a lot lol.
@TheCivildecay
@TheCivildecay 4 жыл бұрын
How do you normalize the movement so it takes in diagonal movement? If I just normalize the move vector3 it will cause my movement to act slidy (player still moves a bit when releasing the movement buttons)
@Blue_Fox_Plays
@Blue_Fox_Plays Жыл бұрын
Thank you so much for this tutorial! it helped me a lot!
@gigamonZ
@gigamonZ Ай бұрын
Now our brackeys is backkkk babyyyy!!!!!!!!!!!🥰
@raffe7889
@raffe7889 3 жыл бұрын
I can't believe Brackeys is gone ;_; Their content is still amazing though and they made A LOT of it
@TheCorruptClown32518
@TheCorruptClown32518 3 жыл бұрын
Wut happened
@DemonPig666
@DemonPig666 3 жыл бұрын
😭😭
@FuzzyWeasel
@FuzzyWeasel 3 жыл бұрын
I know.its sad. But I think codeMonkey still makes videos. You could check him out
@emirhansoyluBF
@emirhansoyluBF 3 жыл бұрын
I'm still crying :''''(((((
@faisalalodat9037
@faisalalodat9037 3 жыл бұрын
:(
@MidasClutch
@MidasClutch 3 жыл бұрын
Me- follows instructions carefully and does everything he says Unity- 1 error: please delete unused term “mouseY Me- removes mouseY Unity- 1 error: please add “mouseY Me- *dies*
@holliscf
@holliscf 3 жыл бұрын
Space in btw mouse and Y?
@learnenglishinhouse3102
@learnenglishinhouse3102 3 жыл бұрын
error because the space, is "Mouse Y"
@sohamacharya171
@sohamacharya171 3 жыл бұрын
A catch 22 situation.
@fillament
@fillament 3 жыл бұрын
That happens too much.
@sylinder__2633
@sylinder__2633 2 жыл бұрын
personally it says i have to setup mouse x but i dont know how to do it
@Super_Nova919
@Super_Nova919 Жыл бұрын
This Helped me so much, you deserve a subscribe :)
@Cold_soup._.
@Cold_soup._. Жыл бұрын
This genuinely helped so much fr
@bagger1451
@bagger1451 2 жыл бұрын
Me: Copys his code perfectly Unity: 341 Errors Me: Adds 1 letter Unity: Perfect.
@lcj3_
@lcj3_ 2 жыл бұрын
fax man me: **Forgets to put a semicolon** Unity: This semicolon will ruin your life now.
@Ikaros-fo5cb
@Ikaros-fo5cb 2 жыл бұрын
for some reason the script for the mouselook doesn't work on my "game" what do i do?
@FelineRaptor-gv4te
@FelineRaptor-gv4te 2 жыл бұрын
@@lcj3_ but your IDE will point out where you missed the semi colon
@lcj3_
@lcj3_ 2 жыл бұрын
@@FelineRaptor-gv4te i accidentally wrote an # in the middle of the code without even realizing and it took me 2 hours to find me that p.........
@lcj3_
@lcj3_ 2 жыл бұрын
@@FelineRaptor-gv4te unity didn't even tell me where the error of the code was, it was pointing to something that i wrote correctly, when i removed the #, everything worked perfectly
@tres-2b299
@tres-2b299 3 жыл бұрын
I used this tutorial just to know how to rotate and actually make the player move, i have all the new input system stuff already with mobile joystick, and it worked!
@luketabois2620
@luketabois2620 2 жыл бұрын
so glad they left all their videos up the gravity code helped me out big time
@klaus-wd6en
@klaus-wd6en 2 жыл бұрын
Brackeys you are the best game dev ever cuz u teach it to us. I am inspired by you and wanna make a game which everyone can enjoy:D
@bobsapdagger
@bobsapdagger 4 жыл бұрын
Gotta say there's nothing quite as satisfying as successfully debugging; it's a mountain of negativity instantly lifted, no more errors, no more red squiggly lines, no more self doubt you don't even care that it was something really stupid, it still feels good.
@eeevoo
@eeevoo 4 жыл бұрын
couldn't have said it better
@marcusaddison8866
@marcusaddison8866 4 жыл бұрын
Out ranks all those satisfying video compilations on KZfaq
@h.k654
@h.k654 4 жыл бұрын
Can anyone help me? I have a problem where I cant jump even though I copied the exact code.
@eeevoo
@eeevoo 4 жыл бұрын
@@h.k654 Did you assign the script to the player?
@h.k654
@h.k654 4 жыл бұрын
​@@eeevoo Yes.
@breadnotseen4292
@breadnotseen4292 3 жыл бұрын
I know this will probably get buried and that this is kinda common knowledge but I found out how to add sprint! if (Input.GetKey("left shift") && isGrounded) { speed = 20f; } else { speed = 12f; }
@MimsTwo
@MimsTwo 3 жыл бұрын
Thanks!
@wolfster7776
@wolfster7776 3 жыл бұрын
Amazing it is working Tx
@poizan8460
@poizan8460 3 жыл бұрын
you shouldn't add the && isGrounded, since sprinting make's you jump abit further ahead! Just saying though ;)
@wolfster7776
@wolfster7776 3 жыл бұрын
ohh
@jcdenton7273
@jcdenton7273 3 жыл бұрын
dont put the && isGrounded as Poizan said, instead wrap it in an if statement like this: if (isGrounded) { if (Input.GetKey("left shift")) { speed = 20f; } else { speed = 12f; } }
@napoleon384
@napoleon384 2 жыл бұрын
man i always wanted to make games and u are best teacher that i could've asked for, everything is detailed and easy to understand. i always thought that gamedev was hard but then i found u. thank a lot
@sofiaonaga5352
@sofiaonaga5352 Жыл бұрын
I optomized it for the new input system and it works great!
@zimistic6680
@zimistic6680 3 жыл бұрын
“Man coding is so easy and works every time!” -nobody on planet earth
@jacobjackson8619
@jacobjackson8619 3 жыл бұрын
if i hear anyone say this, i smack their face with the errors i got in the last 5 mins
@doge7831
@doge7831 3 жыл бұрын
I got 999+ errors in 5 minutes of coding.
@noamyairperelman875
@noamyairperelman875 3 жыл бұрын
@@doge7831 me to
@ruddydd4085
@ruddydd4085 3 жыл бұрын
truth :p
@shadybandit7
@shadybandit7 3 жыл бұрын
its actually ez and i didn't get any erro
@redspartan7772
@redspartan7772 3 жыл бұрын
There’s nothing better than that feeling when you complete some code and get no errors
@shard7572
@shard7572 3 жыл бұрын
Ah, yes that feeling when the stars align
@mrgibus8278
@mrgibus8278 3 жыл бұрын
Sadly, for me that is a feeling I have yet to expirience
@goodgamershow6505
@goodgamershow6505 3 жыл бұрын
it's all cool and etc, but have you ever finally piss, after not being able to do it for several hours straight?
@sohamacharya171
@sohamacharya171 2 жыл бұрын
A worse thing is when you have no errors but it still doesn't work.
@ionutdaniel4059
@ionutdaniel4059 2 жыл бұрын
I got no errors *Starts the game and tries to move camera* unity: best i can do is spin
@nofch247
@nofch247 2 жыл бұрын
Your a life saver thank you so much for all the help you are putting in for my game
@TOWMIG
@TOWMIG Жыл бұрын
noch?
@WextraYT
@WextraYT Жыл бұрын
@@TOWMIG n o c h
@TOWMIG
@TOWMIG Жыл бұрын
@@WextraYT nice
@xo_animez
@xo_animez Ай бұрын
Thank you for explaining it so simply . Ur amazing
@nicolaicardinale7902
@nicolaicardinale7902 3 жыл бұрын
It's 2021 and this video is still a GODSEND. thank you so much for not just good instructions but clear ones.
@gokhon_
@gokhon_ 4 жыл бұрын
My soul has left my body 8 minutes in
@harunisjohn3783
@harunisjohn3783 4 жыл бұрын
This comment is underrated :D :D
@Mojzer_
@Mojzer_ 2 жыл бұрын
yoo this actually helped me, TYVM!
@gamingtech4973
@gamingtech4973 Жыл бұрын
Thanks a ton. Only video to help me
@Semmetje11lolly
@Semmetje11lolly 3 жыл бұрын
2:49 video starts here (for myself, because I'll be coming back here A LOT)
@thunderbear06playsstuff63
@thunderbear06playsstuff63 3 жыл бұрын
Well you could export the player as a package so that you can import it into more projects in the future
@thunderbear06playsstuff63
@thunderbear06playsstuff63 3 жыл бұрын
thats what im trying to do rn
@matthewsimpson796
@matthewsimpson796 3 жыл бұрын
Thanks?
@timmy21r
@timmy21r 3 жыл бұрын
@@thunderbear06playsstuff63 How do you do that?
@thunderbear06playsstuff63
@thunderbear06playsstuff63 3 жыл бұрын
@@timmy21r This should be what your looking for docs.unity3d.com/Manual/AssetPackagesCreate.html hope that helps
@imaUFO672
@imaUFO672 4 жыл бұрын
Just when i needed a tutorial like this, you’re a life saver!
@andrews4208
@andrews4208 4 жыл бұрын
i cant place closed brackets, how did you do it
@lairdbeatte9000
@lairdbeatte9000 2 жыл бұрын
really help full, Thanks so much!!!
@pringl3
@pringl3 8 ай бұрын
YESSS TYSM FOR THIS, my one finally worked after try about 5 other tutorials
@jagger9202
@jagger9202 4 жыл бұрын
That moment when you learn more then you do in school
@desmondcayce
@desmondcayce 4 жыл бұрын
that moment when you realize that not learning in school is partially or all your fault
@AcroGrade
@AcroGrade 4 жыл бұрын
@@desmondcayce Or maybe school doesn't always pace properly for everyone and doesn't always teach to the highest common denominator. Why do you think why most people are self taught programmers?
@desmondcayce
@desmondcayce 4 жыл бұрын
@@AcroGrade if your school doesnt pace properly than its YOUR responsibility to have to catch up
@unclesam997
@unclesam997 4 жыл бұрын
@@AcroGrade Yeah I'm not gonna lie if you're in a university CS program it's very unlikely that the course work will be too easy for you if you're in a school that's at least average. In my degree I've never met anyone who switched out because they thought it was too easy, but I've met a ton who switched out because they couldn't handle it.
@hexil6283
@hexil6283 4 жыл бұрын
@@desmondcayce he means that the school system Yes the whole school system is bad and that everything you learn there is simply useless because like come on mate tell me about some lessons that we actually used aside from elementary school
@elvisdeleon6709
@elvisdeleon6709 2 жыл бұрын
Concise tutorial! Great for experts and beginners!
@historyvault-s2v
@historyvault-s2v 2 жыл бұрын
thank you so much it helped me with my game
@davidgames3905
@davidgames3905 Жыл бұрын
Great video , really helped me
@jacobfenech7662
@jacobfenech7662 4 жыл бұрын
My brain when I am a 13 year old boy and just started programming: Just copy everything and it'll work. You don't have to understand the code. (2 seconds later) Unity: You have to fix compiled errors. Me: Time for new project.
@salemisjuucy
@salemisjuucy 4 жыл бұрын
I'm thirteen and it's pretty simple, make sure your line of code is in between an opening and closing bracket, make sure there are no spelling errors, and maybe just learn the basics of c# like i did
@Just_Cat.
@Just_Cat. 4 жыл бұрын
same
@InsaneJumpscare
@InsaneJumpscare 4 жыл бұрын
@@salemisjuucy compiled errors
@NielsKnives
@NielsKnives 4 жыл бұрын
I m 12 and i get it
@InsaneJumpscare
@InsaneJumpscare 4 жыл бұрын
N M video's but it still has errors, am I using the wrong coding app? I am using c# visual studio
@suspense_comix3237
@suspense_comix3237 3 жыл бұрын
I spent 30 minutes on trying to get the camera to rotate when I figured out I needed to save my code. I D I O T LOL
@aravind.s1187
@aravind.s1187 3 жыл бұрын
lool
@greenappleplaysroblox1661
@greenappleplaysroblox1661 3 жыл бұрын
How do you save it
@suspense_comix3237
@suspense_comix3237 3 жыл бұрын
@@greenappleplaysroblox1661 Ctrl + S
@greenappleplaysroblox1661
@greenappleplaysroblox1661 3 жыл бұрын
Suspense_Comix thank you
@aravind.s1187
@aravind.s1187 3 жыл бұрын
@@greenappleplaysroblox1661 lol
@Hunter_ED4
@Hunter_ED4 Жыл бұрын
Thank you so much it really helped me!
@mesopithecus8622
@mesopithecus8622 2 жыл бұрын
Little late, but here is a way you can add Sprint: Set speed to a private variable with no value.(private float speed;) Add something like: public float runSpeed = 20f; public float walkSpeed = 12f; (You don't have to use these values, change them to what you want.) if(Input.GetButton("")) { speed = runSpeed; } else { speed = walkSpeed; } Note that you can also use Input.GetKey, but I prefer GetButton(as it gives you lets you do more, and because it is then really easy to remap controls) Hope this helps.
@user-er3kw8hv7i
@user-er3kw8hv7i 2 жыл бұрын
whats the key for left shift?
@mesopithecus8622
@mesopithecus8622 2 жыл бұрын
@@user-er3kw8hv7i You could use GetKey(KeyCode.LeftShift) But I recommend going to the input manager and setup a left shift button. You could look up a tutorial online, or if you can't find one i could make on for you
@Ze_N00B
@Ze_N00B Жыл бұрын
@@user-er3kw8hv7i it's "left shift". Go into Edit>Manage Settings > Input Manager, expand the axis limit, rename the newest axis to "Sprint" or what have you, then input "left shift" where the positive action is. Then write the name "Sprint" in your code to have it use it.
@NotMrLex
@NotMrLex Жыл бұрын
thank you very kind stranger.
@sohodollie7643
@sohodollie7643 Жыл бұрын
You can also check if the character is grounded. If the character is grounded, change speed = runSpeed and deplete a stamina bar, if the character is in the air, dont change speed at all. you could also add a "dash" button that increases horizontal velocity in the forward direction to let you dash mid-air
@boysminecraftianos469
@boysminecraftianos469 4 жыл бұрын
Me yesterday: Well, I'm gonna take part of a GameJam from my programming school, so I think I'll do a 3D First-Person Survival Game. *And I want to do as much as possible alone, not copying code or getting stuff from the internet* Me after taking a look at this video: The hell are quaternions? Me after searching about it: I'd better copy some code
@talibalasrar
@talibalasrar 4 жыл бұрын
Everyone copies code at first you will learn gradually over time
@davidfails2866
@davidfails2866 4 жыл бұрын
Haha... Explain them to me im too lazy to look them up
@linshu6141
@linshu6141 4 жыл бұрын
Most of the time u will copy code anyway. Just putting it together and make a final and unique game out of it is the difficult part. Of course u will learn over time the basics that u often use but i promise you u can't learn everything.
@itzyuzuruclips
@itzyuzuruclips 4 жыл бұрын
lol I'm working on a game with my grp and I'm at the same stuff 😂😂 Now imma copy some movements and aim codes
@icantthinkofaname2722
@icantthinkofaname2722 4 жыл бұрын
You don't need to know how Quaternions work to utilise their implementation. Tbh you wouldn't even need to know how they work to implement them yourself (even if it would certainly be helpful).
MAKE AN RPG WITHOUT CODE - Unity Creator Kit
24:18
Brackeys
Рет қаралды 469 М.
3 Devs Make An FPS - Godot vs Unity vs Unreal || GameDev Battles
12:39
100❤️
00:19
MY💝No War🤝
Рет қаралды 24 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 21 МЛН
I Made Squid Game, But it's a Multiplayer Game
14:12
Dani
Рет қаралды 10 МЛН
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,4 МЛН
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 4,3 МЛН
HOW TO GAME JAM!
9:01
Brackeys
Рет қаралды 268 М.
Teaching A.I. to Play my Game!
10:45
Dani
Рет қаралды 3,3 МЛН
The Future of Game Development
8:58
Brackeys
Рет қаралды 1,2 МЛН
Why Do Video Game Studios Avoid Blender?
6:49
The Cantina
Рет қаралды 437 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 500 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 696 М.
100❤️
00:19
MY💝No War🤝
Рет қаралды 24 МЛН