Free 3rd Person Camera Setup & Camera Collision Tutorial

  Рет қаралды 163,317

Filmstorm

Filmstorm

Күн бұрын

Пікірлер: 415
@Kevinaya
@Kevinaya 2 жыл бұрын
When cinemachine doesn't work but a 5year old tutorial still works thanks bro👍
@bastelbudi
@bastelbudi Жыл бұрын
agree. that cinemachine collision stuff is so dump to understand. this wold stuff works way better for me.
@wahebplays
@wahebplays Жыл бұрын
i want the camera to colide with certain objects (not all object ).by adding layer to the script , but idk how . can you help me ?
@Kevinaya
@Kevinaya Жыл бұрын
@@wahebplays add those objects to the ignore raycast layer Or on the the script creat a layermask variable and add the variable name using a comma to the line of code where we shoot the ray cast. Then in the editor u will see a layermask variable on the script select all the layermasks u want a raycast to collide with
@Kevinaya
@Kevinaya Жыл бұрын
​@@wahebplaysthis how ur second script should be edited Public layermask mask If(physics.linecast(transform.parent.position, desiredcameraPos, out hit,mask); Hope this helps 👍
@wahebplays
@wahebplays Жыл бұрын
@@Kevinaya thank you so much . i'm gonna use first method
@Kyle-gc6ef
@Kyle-gc6ef 5 жыл бұрын
wow i've spent 12 hours trying to get a good camera and then i find this video, thank you.
@robosergTV
@robosergTV 3 жыл бұрын
You could have spent 3 seconds to learn to use google and find about Cinemachine in Unity...
@luiss.3866
@luiss.3866 4 жыл бұрын
Finally what I was looking for. At first i thought it was going to involve a lot of scripting but then i realized that you were making two scripts. One for moving and the one that i was looking for which was the camera moving foward when obstructed by a wall, which was a lot less script. You get a like from me dude.
@paturuzu4705
@paturuzu4705 3 жыл бұрын
How about a friend, I am from Argentina, I just discovered your video recently and I put it to the test in a game that I am creating and your collision camera really works perfectly, thank you very much and a brotherly hug for your contribution to all those people who want to develop a game but they still lack knowledge to be able to make it happen, a hug with all my heart I send you from Argentina
@Filmstorm
@Filmstorm 3 жыл бұрын
Big hug back to you :)
@quippits3201
@quippits3201 3 жыл бұрын
This is probably the minimum amount of scripting possible to create working camera collision. Bravo, my dude
@GWConspiracy
@GWConspiracy 6 жыл бұрын
For anyone running into the issue of the camera sticking exactly on the CameraFollow object (which makes the camera seem more like a First-Person Cam), double-check 2:07 where CameraBase is placed. The Main Camera is not kept at (0,0,0) local position. If you give it a negative Z position, say -5, the rotation will work as intended.
@tristanboumans3262
@tristanboumans3262 5 жыл бұрын
thanks a lot
@user-mh2bh1tb8q
@user-mh2bh1tb8q 5 жыл бұрын
you are a savior
@mbumb595
@mbumb595 5 жыл бұрын
Can't thank you enough. I was losing my mind lmao
@MrSmoofist
@MrSmoofist 4 жыл бұрын
Thank you soooo much!!! But now suddenly my character wont move :/
@m0tix
@m0tix 4 жыл бұрын
still, doesn't work. help!!
@mch
@mch 7 жыл бұрын
I was looking for something like this for over 4 hours and didn't find anything helpful untill I've come here. It turned out that my own camera controller script was working in such way that it was impossible for me to avoid clipping through the walls (I had to start from scratch). I've basically just copied what you've did because it was so well done. :P Thanks mate. Next time this will be the first place I will visit if I encounter some other problems. Really good job! :)
@24yrukdesigner
@24yrukdesigner 6 жыл бұрын
Love the tutorial, but the intro is annoying as hell... It comes on really loud in comparison to other clips i was watching. Intro videos should be the quietest part to allow you to have time for adjusting volume if needed, but this one starts with a BOOM!!!
@andruw5075
@andruw5075 6 жыл бұрын
Same but I took days to find this tutorial
@tolulopemalomo8922
@tolulopemalomo8922 7 жыл бұрын
Your tutorial is super helpful! There are some unused variables we declared though
@АндрейЧудаков-ы9э
@АндрейЧудаков-ы9э 4 жыл бұрын
Don't invert mouse input, you can just set rotationX be "-=" instead of "+=", this will work fine. Also for those of you that get their camera stuck in character body, make sure you attach it to CameraBase but not Main Camera itself. Anyway nice tutorial tho.
@nico_crowned
@nico_crowned 4 жыл бұрын
Can you please explain to me what you mean by CameraBase ??? I'm still a noob
@randumbguy4720
@randumbguy4720 4 жыл бұрын
@@nico_crowned watch the video, the camera base is just a gameobject made guy instructing
@hemachandru4838
@hemachandru4838 4 жыл бұрын
finnaly after a month a guy found very clear voice very clear code worked for me +1 like earned :)
@burnobad
@burnobad 2 ай бұрын
this is insanely good tutorial. And lmao i stumbled uppon it right after i figured myself how to do this camera but without parent objects, by just using quaternions
@dmd356
@dmd356 3 жыл бұрын
Anyone having issues with adding movement and getting jerky cam on movements, use fixed updates on your MOVEMENT scripts instead of update, and on your CameraFollows script you can use Lerp rather than MoveTowards to get that sense of running when using faster movements.
@sleepysnowpoff
@sleepysnowpoff 3 жыл бұрын
thank you!
@mmitchell10000
@mmitchell10000 7 жыл бұрын
I've been looking for, researching, and attempting to rig a camera system to work this exact way, thank you for this tutorial!
@Filmstorm
@Filmstorm 7 жыл бұрын
+Michael Mitchell Most welcome Michael!
@knusperjunge
@knusperjunge 5 ай бұрын
Hello peoples, i have a problem with 4:17, when i write "GameObject" unity give and error message saying:dis aint gonna work; any Idea on how to fix it?
@Filmstorm
@Filmstorm 5 ай бұрын
Do you have the correct namespace at the top of the script using UnityEngine; GameObject is a base type from unity engine so shouldn’t have by errors involved. Check to see what the console error is and I can have a look.
@knusperjunge
@knusperjunge 5 ай бұрын
@@Filmstorm 1. Looks like it works now, which is weird cause i did the exact same thing but, oh well and 2. How the hell did you reply in 6 minutes??; anyways, thank you :3
@Filmstorm
@Filmstorm 5 ай бұрын
@knusperjunge great to hear it’s working 👍🏼👍🏼
@knusperjunge
@knusperjunge 5 ай бұрын
@@Filmstorm got a funny problem again, "ArgumentException:Input Axis RightStickVertical is not setup." I should be able to move the camera now, but i just get this error
@A93A93
@A93A93 3 жыл бұрын
Dude so awesome! I had a different collision set up but it made the camera jitter on collision, this works way better!
@oliverscott6913
@oliverscott6913 5 жыл бұрын
The tutorial may be slightly long but BOI is it worth, you just got a new sub :D
@rishabhlaheja7689
@rishabhlaheja7689 6 жыл бұрын
Not just u provided a tutorial I was looking for but also explained it soooooo precisely....great job...love your channel !!! 👍 Although I did get confused at times...😅 But that's on me...m a rookie!
@Filmstorm
@Filmstorm 6 жыл бұрын
Awesome Rishabh! Thanks for watching! 👍🏼👍🏼
@rishabhlaheja7689
@rishabhlaheja7689 6 жыл бұрын
Thanks for such good tutorials!! 😍
@rishabhlaheja7689
@rishabhlaheja7689 6 жыл бұрын
Just a question...might sound silly I don't know...but should I refer your this tutorial for camera or the cinemachine tutorial...which in your opinion would be good to use for a small 3D tps adventure game I am making
@nggiprayoga
@nggiprayoga 4 жыл бұрын
⭐️ This is the best tps game tutorial. Many in it that I did not find on other sites or channels. The explanation is very good. I really recommend this tutorial.
@Filmstorm
@Filmstorm 4 жыл бұрын
Thanks so much for watching 🙏👍🏼
@venomz7682
@venomz7682 Жыл бұрын
Best unity tutorial man, so helpful fr
@wahebplays
@wahebplays Жыл бұрын
i want the camera to colide with certain objects (not all object ).by adding layer to the script , but idk how . can you help me ?
@raisapernu7170
@raisapernu7170 4 жыл бұрын
Camera turned into 1st per camera and it spins 24/7 :D I have multiple characters to select and I am working on prefabs.
@hugotonelli9717
@hugotonelli9717 7 жыл бұрын
Thanks for the tutorial! I needed zoom in/out and collision with certain objects only, so I made a few modifications of my own and it works exactly as I need it to. (In case anybody needs the script, look for my reply to Talisman Skulls' comment)
@TyxDemon
@TyxDemon 2 жыл бұрын
I tried finding the person in mention, i dont see them
@hugotonelli9717
@hugotonelli9717 2 жыл бұрын
This thing is not letting me post the answer 😢
@o2Hayden
@o2Hayden 6 жыл бұрын
*Anyone who is having problems with the camera snapping to the CameraFollow gameobject, read this.* The CameraBase gameobject is what snaps to the CameraFollow gameobject. So simply move the Camera (should be a child of CameraBase) to the desired camera location.
@edisyo
@edisyo 6 жыл бұрын
Finally, some good tutorial. Appreciate it very much!
@Filmstorm
@Filmstorm 6 жыл бұрын
Thanks Eduards!
@courtneydaniels5559
@courtneydaniels5559 5 жыл бұрын
This is the best unity tutorial i have seen. Great work!
@Oxmond
@Oxmond 4 жыл бұрын
Cool tutorial! Great camera script! 👍🤓
@Filmstorm
@Filmstorm 4 жыл бұрын
Thanks again! 🔮
@paoloolivariguerra3D
@paoloolivariguerra3D 6 жыл бұрын
Thank you soooo much!!!! You don´t know how long i was searching for this tutorial. !! Greetings and good job!! :D
@offbrandbleach2604
@offbrandbleach2604 5 жыл бұрын
This probably will never get a response but whatever. The camera always goes into a weird first-person like camera and the camera never follows. I redid the steps over and over and it just never works like 16:42. I have a custom model (it literally is just a capsule that moves and when it runs into other objects it changes their color) so I don't know if that is interfering but it really is annoying.
@adamcooke3591
@adamcooke3591 5 жыл бұрын
Camera keeps snapping to a different point please advise on how to fix this?
@vikkosti
@vikkosti 7 жыл бұрын
Excellent tutorial, I like the small tutorial chunks you do to explain individual elements of unity.
@purpl3grape
@purpl3grape 6 жыл бұрын
Thanks for your tutorial. I've made use of the Camera Collision to aid me in creating a third person Camera (with some tweaks), with a different approach to solving the moving Camera to not remain within walls or other objects. I'll post the update soon, with a video for some results. Just a minor tweak really.
@nizar5581
@nizar5581 5 жыл бұрын
I´m now at 16:47 more or less and everything woks perfectly except that my Cameras position has turned into the position of the CameraBase or the FollowObject but idk why? If you see this, very good Tutorial, but i might need a little help to figure out why it isnt working. I´ll ive you the code, most of it are just variables at the time soo, yeah, help lol
@nizar5581
@nizar5581 5 жыл бұрын
Update: I´ve downloaded your Code and tested it: same result, it´s like a first Person Game. Maybe this isn´t compatible with unity 2019
@chessersstudios1778
@chessersstudios1778 4 жыл бұрын
had an issue where the distance would change but the camera would change position. remember that if you have an animator attached to the camera that the idle animation is not set to a particular position otherwise it will be locked at 0,0,0
@uchihamadara271
@uchihamadara271 7 жыл бұрын
Keep making tutorials man, you are awesome!
@AWE_some_ZT
@AWE_some_ZT 4 жыл бұрын
DAMN! You really make the whole thing so easy!!!
@ThePavilionWeb
@ThePavilionWeb 6 жыл бұрын
Great Video, clear instructions, good audio quality, just subscribed and looking forward to following your progress, sharing is caring and its much appreciated!
@Filmstorm
@Filmstorm 6 жыл бұрын
Thanks for watching Chris, means a lot to hear feedback like yours. :)
@AdamSweeney85
@AdamSweeney85 7 жыл бұрын
You never coded anything for CamDistanceToPlayerX,Y,Z?? What's that about and also I followed this to the letter but my camera always snapts to the postion of the Camera follow Object (inside my player model) can you help with this please?
@MrAllenHBC
@MrAllenHBC 7 жыл бұрын
Any luck with fixing this?
@AdamSweeney85
@AdamSweeney85 7 жыл бұрын
Nothing yet.
@MrAllenHBC
@MrAllenHBC 7 жыл бұрын
I fixed it by resetting everything to zero and then moving the camera
@Filmstorm
@Filmstorm 7 жыл бұрын
Hi there, I’ll make a quick step by step article on game dev coding to walk you through how to set this up :)
@Filmstorm
@Filmstorm 7 жыл бұрын
Here you go: www.gamedevcoding.com/unity/camera-collision-system-script/
@AuraController
@AuraController 5 жыл бұрын
Hello there. First, thank you for the wonderful tutorial. It is easy to follow and I love your live examples. I have followed your tutorial up to 17:05 but my camera rolls to above the player and continues to spin in a clockwise direction. It is reading the input from the mouse because when I move mine the camera does go down or fight the spinning. But it continues to spin regardless. I already have assets and scripts in my game and I am adding this later in the development stage. Do you have any ideas as to what is causing this? Thank you for your help!
@lavistro84
@lavistro84 5 жыл бұрын
check your inputs in the update: Mouse X or Y might be inputted twice
@Sharkz-iz6yf
@Sharkz-iz6yf 4 жыл бұрын
Got it! Thx! Is there a part 2?
@wahebplays
@wahebplays Жыл бұрын
i want the camera to colide with certain objects (not all object ).by adding layer to the script , but idk how . can you help me ?
@knusperjunge
@knusperjunge 5 ай бұрын
I got a funny problem, "ArgumentException:Input Axis RightStickVertical is not setup." I should be able to move the camera now, but i just get this error
@Filmstorm
@Filmstorm 5 ай бұрын
You need to setup a custom input for the right stick, called RightStickVertical in the input manager. docs.unity3d.com/Manual/class-InputManager.html Right stick vertical should be 5th axis - or change axis by testing moving the right stick.
@knusperjunge
@knusperjunge 5 ай бұрын
@@Filmstorm Omg, I am so incredibly dumb; I wrote „RightStickVerticale“ in the Input Manager, that was the problem 😅 Thank you so much and sorry for wasting your time
@wouwou9146
@wouwou9146 3 жыл бұрын
I am using this camera follow and camera collision BUT! I encountered an interesting problem. My character is holding a spear which has a collider (due to melee attacks). The camera collision hits this and makes the camera view all jittery. Basically this happens always when the weapon is between CameraFollow and Camera. I'd like to set the CameraFollow below hips but then this spear is kinda on the way. Any suggestions how to make cam collision to ignore the spear? The weapon is using outline Layer so I cannot set different layers to game objects. I tried using tags and it doesn't seem to work. Probably I don't even know how to do it. Now it looks like "if (Physics.Linecast (transform.parent.position, desiredCameraPos, out hit)) { distance = Mathf.Clamp ((hit.distance * 0.9f), minDistance, maxDistance); ignorance = GameObject.FindGameObjectWithTag("Collision"); }" GameObject ignorance; is on the 4 row so it does not give me any errors.
@uhuhyesm435
@uhuhyesm435 5 жыл бұрын
code looked fine but I'm getting "UnassignedReferenceException: The variable CameraFollowObj of CameraFollow has not been assigned. You probably need to assign the CameraFollowObj variable of the CameraFollow script in the inspector." Anyone have some ideas?
@Filmstorm
@Filmstorm 5 жыл бұрын
You’ll need to create an game object and place it inside your place inside your player and then drag it into the script for CameraFollowObj 👍🏼 let me know if you’re still stuck
@uhuhyesm435
@uhuhyesm435 5 жыл бұрын
Oh my bad it will go into CameraFollowObj in Camera Base But the error persists
@uchihamadara271
@uchihamadara271 7 жыл бұрын
Hi, can you please continue the series of "Create a Third Person System - PART 6 - Structuring AI." I've been waiting for so long! It's awesome man, I couldn't find someone as genius as you! Your tutorials are very helpful!
@Onek3i
@Onek3i 4 жыл бұрын
Do you have a movement script the goes well with this?
@sestareknewgamestar2631
@sestareknewgamestar2631 4 жыл бұрын
Hello! Please tell me how to make a smooth camera along the Y axis. I have a jump void and when I use it the camera jerks up very strongly
@hdgraficoscreadordeconteni4280
@hdgraficoscreadordeconteni4280 5 жыл бұрын
I have learned more with your tutorials in English, than those of Spanish 👍
@fernandopandolfo8923
@fernandopandolfo8923 4 жыл бұрын
Ah somebody, please help! In this line the command (between ***) makes the camera go straight to the center of the Target object, why? =( Transform target = followObj.transform; float step = cameraMoveSpeed * Time.deltaTime; *** transform.position = Vector3.MoveTowards(transform.position, target.position, step); ***
@АндрейЧудаков-ы9э
@АндрейЧудаков-ы9э 4 жыл бұрын
Make sure you attach the script to CameraBase, not the Main Camera object itself
@kayarawasbanlaywa2506
@kayarawasbanlaywa2506 6 жыл бұрын
Why the camera is just turning ? it doesn't cooperate to my mouse please help me :(
@jeffstone3227
@jeffstone3227 6 жыл бұрын
I'm having the same problem as others, camera just snaps right to CameraFollow, not really sure how to resolve it, I have written it exactly the same
@Filmstorm
@Filmstorm 6 жыл бұрын
Hi Jeff, I will make a short tutorial to explain how to correctly setup it up under two minutes today 👍🏼
@jeffstone3227
@jeffstone3227 6 жыл бұрын
Great Thank you!
@HALO360Chris
@HALO360Chris 6 жыл бұрын
i got the same issue have you made the vid yet?
@jeffstone3227
@jeffstone3227 6 жыл бұрын
Have you had a chance to work on the fix yet?
@missasasha
@missasasha 2 жыл бұрын
i have a problem, my camera collission doesnt work ! i checked inspector and the distance changes when i hit the object. what did i do wrong ? the code is exactly the same
@Ryuk_tim
@Ryuk_tim 5 жыл бұрын
Very nice, work on unity 2018 with no problem. I dont have test on my phone.thx for this tutorial.
@youngyeh
@youngyeh 5 жыл бұрын
Hi, it is a awesome script, especially the collision part, but I found that when my character move backwards(move to camera) the camera would collide with character, how to fix this?
@Filmstorm
@Filmstorm 5 жыл бұрын
The character should be on a different layer from the detecting collision raycast layer, this will stop the collision with the player 👍🏼
@youngyeh
@youngyeh 5 жыл бұрын
@@Filmstorm Thanks for the hint, that helps a lot (btw, what's the difference between Linecast and Raycast ??
@yannick2237
@yannick2237 5 жыл бұрын
@@Filmstorm could you please explain how I do that?
@mohamadjeldeh1094
@mohamadjeldeh1094 4 жыл бұрын
thank you so much, put a little question is that I have a tank so when I move the camera I want the tank cannon to rotate with the camera is that possible with the same script that you made
@dkordy
@dkordy 2 жыл бұрын
The one of great importance you did not tell - how to implement min and max clamp 17.22 - i m beginer and dont know... i was waithing whole video and that what was important to me did not find out... i need only that,how to put in sctipt min and max clamp? Can enyone help?
@thomaslinger9001
@thomaslinger9001 3 жыл бұрын
Awesome solution, even in 2021! Great job ;)
@FuryFight3r
@FuryFight3r 6 жыл бұрын
After writing out all the code you instructed, I ran into a problem where the camera would position itself to CameraFollowObj and would look around like a FPS not TPS, how can i make my camera Orbit the CameraFollowObj rather than teleport to CameraFollowObj?
@Big-f2p
@Big-f2p 5 жыл бұрын
3:17 listen... he says "it's pretty F.... ehm... simple once you get..." no "FUCKS on this channel lmao ;)
@m0tix
@m0tix 4 жыл бұрын
HELP! I don't know why it doesn't work, I even downloaded the script! The camera base is offset, I tried everything, but the camera+base sticks to the player!! Edit: Got it working now.
@chenohana2386
@chenohana2386 4 жыл бұрын
how did you fixed it?
@m0tix
@m0tix 4 жыл бұрын
@@chenohana2386 Move the Cam away from the Base
@andythedishwasher1117
@andythedishwasher1117 2 жыл бұрын
float = fractional value, int = non-fractional value
@AsitorCorporation
@AsitorCorporation 5 жыл бұрын
First of all, many thanks for the tutorial. Just one problem I'm having, the camera currently stays looking in the same direction if my player turns. It is important for me (as the player in my scenario is a spaceship that can move and face any direction) that the camera controls sort of stay locked onto the player such that if the ship turns right, the camera turns automatically, the same going for if the player turns 90 degrees up, it should feel exactly the same as before. I was using a camera game object child of the ship originally, but this method gives much more freedom - I just don't know how to "lock" it to move with the player. Would you be able to assist? Thanks.
@gamerszone2496
@gamerszone2496 7 жыл бұрын
2 errors 1. Assets/camerafollow.cs(51,30): error CS0103: The name `localRotation' does not exist in the current context. 2.Assets/camerafollow.cs(50,20): error CS0117: `UnityEngine.Quaternion' does not contain a definition for `localRotation'.
@Filmstorm
@Filmstorm 7 жыл бұрын
Did you write the script yourself from the tutorial? You can follow all the steps from my tutorial step by step here as well as download the scripts to check www.gamedevcoding.com/unity/camera-collision-system-script/
@gamerszone2496
@gamerszone2496 7 жыл бұрын
aah thank you sir.
@krriz-kzr
@krriz-kzr 4 жыл бұрын
On 21:00 with "out hit" Unity gives me error "The name 'hit' does not exist in the current context". I found in Unity Documentation for Physics.Linecast that you have to insert RaycastHit between out and hit so this will look like this: "out RaycastHit hit". I hope this will help someone.
@Razgard
@Razgard 5 жыл бұрын
I've been coding a camera rotation system like this one, but it has an issue. When orbiting, the camera base object has a sligh rotation on the Z axis, which is undesirable. Is there a way to lock the Z axis in place? I'm using Quaternion.Slerp to smooth the camera orbiting and a camera orientation reset on key press.
@dragonfailrage1663
@dragonfailrage1663 5 жыл бұрын
If you solved this issue could you contact me and explain how you did it much appreciated ;)
@Razgard
@Razgard 5 жыл бұрын
I'm still working on it. I'll update if I can solve it.
@charlestheninja
@charlestheninja 5 жыл бұрын
How can i make to the camera rotation works only if i`m holding the left mouse button? I can make it work, but after releasing the left button i would like it to reset to the player rotation, but it bugs and the camera rotation never adjusts to the player rotation...
@bengreat6889
@bengreat6889 4 жыл бұрын
Awesome tutorial...keep up the good work. Please how can I implement this for mobile, that is instead of moving with the mouse input, use touch. Thanks.
@Filmstorm
@Filmstorm 4 жыл бұрын
Thanks Ben! Yes I can cover this in a future tutorial 👍🏼
@pizzanoscope4ever451
@pizzanoscope4ever451 4 жыл бұрын
I really like this tutorial but it seems to not be working in my project, the camera just goes in another position without sticking to the player. If anyone could reach out to me and take your time to explain what is happening, I would appreciate.
@RegulusFen
@RegulusFen 6 жыл бұрын
Thank you, Though, I am wondering to add a mouse wheel scroll in and out
@brovideolol3488
@brovideolol3488 4 жыл бұрын
Is there a second part on this tutorial about adding the movement in aswell? I've seen the third person character from unreal engine 4, and that one has the same camera movement. Im looking for when the player turns around the camera will stay looking in the same position. But as soon als the player walks in the direction the player is facing toward, the camera will rotate to the players direction he is looking in and follows the player again. Any tips?
@just_a_random_guy579
@just_a_random_guy579 4 жыл бұрын
Thanks for helping me out man!
@Filmstorm
@Filmstorm 4 жыл бұрын
Thank you! Thanks for watching!
@ferrismaghi7262
@ferrismaghi7262 5 жыл бұрын
I'm not sure if this should be a concern but... if the player rotate the camera clockwise like 300000 rounds... the rotX will lose its precision and the camera rotation will be clumsy...
@Restrictz
@Restrictz 5 жыл бұрын
the tulple method doen'st work in c# anymore so the clipping through the floors cant be fixed that way is there another solution for that?
@jd7478
@jd7478 3 жыл бұрын
thanks so much! i wasted hours on trying to solve the clipping issue myself :D
@MenacingSnail
@MenacingSnail 6 жыл бұрын
Great tutorial man, thanks!
@redbeardjunior
@redbeardjunior 5 жыл бұрын
Hi I love your work, but I did follow it two but the camera starts in front of my character how can I change it to the back of my character? Thank you
@tenpovine1668
@tenpovine1668 4 жыл бұрын
I'm intrigued. Is there a reason why he's messing with the stick's input? for what reason are they being augmented?
@sparx7747
@sparx7747 Жыл бұрын
What is Dolly Direction stands for ? (sorry my English is not good) :(
@lockekosta9014
@lockekosta9014 4 жыл бұрын
I've been trying for a while to get a decent 3rd person camera up and running but I keep running into jump/jittering issues no matter what method I try. Yours is very barebones and clean so I figured maybe it'd work out, and it very nearly does but I wind up having this jumppy issue: imgur.com/a/rktyOhx Is it a 2020.1 issue or something? Any ideas how to fix this? I can't figure out why this is happening to save my life. Edit: So I figured out that's it has something to do with the project, cause I created a new one, implemented the camera system, no jump issue whatsoever. Unfortunately I'm working in a project that has had quite a few cooks in the kitchen already and is a massive mess, so I have no idea what's causing the issue but yay it's not me being a complete dumb dumb.
@kaineis
@kaineis 5 жыл бұрын
Thank you very much. That was exactly what I was looking for as a complete beginner in Unity. :) :)
@ThegamingrealmJr
@ThegamingrealmJr 6 жыл бұрын
hello, so i did everything you said but for some reason my camera is not focusing on the character. Its focusing under the character. is there a way to fix that?
@tonynealis1165
@tonynealis1165 6 жыл бұрын
Hi and thx for helping others , nice tut,,curious: GIven this, going through walls and objects in Unity, does that mean this won't stop clipping through terrain as well ?
@Filmstorm
@Filmstorm 6 жыл бұрын
I’ve been thinking about coming back to this with more knowledge and redeveloping the clip detection using a spherecast. I’ll let you know when I do. However this current camera will collide against all objects that aren’t the player. I’ll also update the script with layer detection so you choose what to collide and not to collide with. The spherecast will help with not clipping in the first place before starting the camera adjustment 👍🏼
@tonynealis1165
@tonynealis1165 6 жыл бұрын
OK excellent, ty so much for doing this.
@bogdanzajac7858
@bogdanzajac7858 6 жыл бұрын
Hello, your tutorials are so cool, but i have got a problem and i can't solve it out hope u help me. I tried to combine your 2 tutorials "Create an Open World Movement System in Unity C#" and this one (above) . When i did it everything seemed quite good , but when try to push "w" or "arrowUp" the character is animating in place and can't go forward. Don't know is it worths to type this but i download animation from mixamo . Count on any tips because i have no idea what's could going wrong. Hope you reply, regards .
@Filmstorm
@Filmstorm 6 жыл бұрын
Does your animation have root motion enabled? This is what allows your character to move correctly. 👍🏼
@bogdanzajac7858
@bogdanzajac7858 6 жыл бұрын
In animator of my character i've marked apply root motion but it doesn't change anything...
@sapphireyue1324
@sapphireyue1324 6 жыл бұрын
I was looking for the camera rotation + character walking Tut for the Third person. However, when I mix this with the player walking (W, A, S, D) that I've created. The player does not walk towards the direction when I rotate it to the different angle. Does anyone face this problem? Kind of lost by finding lots of tutorial.
@lastronomediscount9304
@lastronomediscount9304 4 жыл бұрын
i have a problem where if i am not moving and the camera isnt colliding with anything, the camera goes to the min distance, idk what is causing this and i have the same script as you edit: i manage to fix it by adding a comma after "out it" in the if statement, and added the max distance value looks like this: if(Physics.Linecast (transform.parent.position, desiredCamPos, out hit, 4)){ it will make it so if the ray hits something farther away then the max camera distance, it will not register
@Filmstorm
@Filmstorm 4 жыл бұрын
🎉🎉
@nico_crowned
@nico_crowned 4 жыл бұрын
I have the same problem that you had and that change in the code did not work for me ... can someone help me please ???
@geosari1751
@geosari1751 7 жыл бұрын
Hello there...well I got a problem.I follow this tutorial step by step in the ends it doesn't have any errors but it doesn't follow the gameobject inside the character and I don't know what to do with this.
@Filmstorm
@Filmstorm 7 жыл бұрын
Hmm did you drag the follow object (the one inside the player) into the script. That would solve the problem I think - let me know or take a screenshot so I can help more
@Filmstorm
@Filmstorm 7 жыл бұрын
Hmm did you drag the follow object (the one inside the player) into the script. That would solve the problem I think - let me know or take a screenshot so I can help more
@vb-8
@vb-8 6 жыл бұрын
This is such an excellent solution, thank you so much for sharing!
@nazariomagido
@nazariomagido 5 жыл бұрын
Thank you! This helps a lot, keep up the great work.
@leontius5502
@leontius5502 4 жыл бұрын
It says my follow object is not assigned even though I assigned it in the inspector panel. Why is this?
@mikehang1243
@mikehang1243 4 жыл бұрын
Hello, i know its a long shot that you will reply because its an old video but, im having a problem with an error message in the compiler' Input Axis Mouse x is not setup' even tho i have set it up the same way as you did, any suggesions?:)
@lukask.3784
@lukask.3784 3 жыл бұрын
Unity starter here. There's is an issue that the camera is zooming when the player is moving at higher speed or is standing in the near of the wall (viewpoint to the wall). I was able to solve it, by adding into the raycast part as a "max. Distance-1"as a fourth parameter. Anyone else with a better/ more professional solution?
@justinfoland4066
@justinfoland4066 6 жыл бұрын
Great tutorial been looking for something like this, but im having a slight issue when in play mode the camera rotates just fine going right to left , but when trying to rotate up and down , the camera rotates on the Z axis ( i think thats the one) where it turns the view (as in when looking at the character it is no longer straight up and down, but now the character is tilted , well the view is tilted to where the view shows the ground on the left or right side of the screen)
@carlose6433
@carlose6433 5 жыл бұрын
you need to reset the rotation of the camera and player to 0's (that's the way i fixed it)
@neonlo554
@neonlo554 4 жыл бұрын
This is helpful but would it be fine If I ask you to make another tutorial of this but in mobile version?, my point is I'm looking for a standalone of this 3rd person controller for mobile devices. Thanks in advance :).
@dadsanddragons875
@dadsanddragons875 6 жыл бұрын
I'm unsure what is going on. I have exactly what you have and if something passes between my character and the camera nothing at all happens. If I make my character touch the thing that is between the camera and it, then the camera zooms in, but to where it should. The links to how to set this up don't work either.
@Filmstorm
@Filmstorm 6 жыл бұрын
Hmm make sure the layer of the collision objects isn’t Ignore Raycast because the camera won’t see them. Also I’m making a further tutorial on how to correctly set this up to make sure it works correctly. 👍🏼
@ngjiayi2705
@ngjiayi2705 2 жыл бұрын
THE BEST VIDEO EVER!!!
@akashiscorner1835
@akashiscorner1835 6 жыл бұрын
hey, I am getting a problem at Vector3 rot = transform.localRotation.eularAngles; I'm getting this error CS1061: Type `UnityEngine.Transform' does not contain a definition for `localEularAngles' and no extension method `localEularAngles' of type `UnityEngine.Transform' could be found. Are you missing an assembly reference?
@gloid4051
@gloid4051 6 жыл бұрын
How do I make an offset so that the camera doesn't snap inside the player? Your gamedevcoding site is down for me at least
@RST9413
@RST9413 5 жыл бұрын
working perfect with what he do in video. but be carreful at input settings to do same. thank you very much!
@H2R_sahil
@H2R_sahil 5 жыл бұрын
Than you for such a useful tutorial
@nico_crowned
@nico_crowned 4 жыл бұрын
Even when my player not moving and the camera isnt colliding with anything, the camera goes to the min distance... i try this in open space and still not working, please someone help me !!!!
@damnbro0707
@damnbro0707 5 жыл бұрын
Amazing, thank you very much. one question though, how can i make the player rotate to the mouse position aswell, and lock the mosue in the centre.
@fabiosimonelli5170
@fabiosimonelli5170 4 жыл бұрын
public GameObject camera; void update() { transform.rotation = camera.transform.rotation; } idk if it works
@damnbro0707
@damnbro0707 4 жыл бұрын
@@fabiosimonelli5170 bro that's like 1 year too late :D
@TheZelanor
@TheZelanor 6 жыл бұрын
Had an issue with the camera still moving a little bit after I let go of my right stick on the controller. I fixed it by only allowed the camera to move if all the axis were above 0.01. Used Math.abs to make a shorter if statement
@Gurem
@Gurem 5 жыл бұрын
I'm having the same problem. Could u tell me how to fix. I'm a complete code noob. Much appreciated if u could help.
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
24 Часа в БОУЛИНГЕ !
27:03
A4
Рет қаралды 7 МЛН
Third Person Camera System using Cinemachine in Unity
19:07
Filmstorm
Рет қаралды 137 М.
Create an Open World Movement System in Unity C#
21:13
Filmstorm
Рет қаралды 99 М.
How to Create a Third Person Camera - Unity Tutorial
11:54
tareqgamedev
Рет қаралды 935
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,5 МЛН
Unity 5 Third Person Camera [Tutorial][C#] - Unity 3d
9:15
Unreal Engine 5 - Smooth Camera Collision
22:59
gotagamee
Рет қаралды 28 М.