When cinemachine doesn't work but a 5year old tutorial still works thanks bro👍
@bastelbudi Жыл бұрын
agree. that cinemachine collision stuff is so dump to understand. this wold stuff works way better for me.
@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 Жыл бұрын
@@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 Жыл бұрын
@@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 Жыл бұрын
@@Kevinaya thank you so much . i'm gonna use first method
@Kyle-gc6ef5 жыл бұрын
wow i've spent 12 hours trying to get a good camera and then i find this video, thank you.
@robosergTV3 жыл бұрын
You could have spent 3 seconds to learn to use google and find about Cinemachine in Unity...
@luiss.38664 жыл бұрын
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.
@paturuzu47053 жыл бұрын
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
@Filmstorm3 жыл бұрын
Big hug back to you :)
@quippits32013 жыл бұрын
This is probably the minimum amount of scripting possible to create working camera collision. Bravo, my dude
@GWConspiracy6 жыл бұрын
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.
@tristanboumans32625 жыл бұрын
thanks a lot
@user-mh2bh1tb8q5 жыл бұрын
you are a savior
@mbumb5955 жыл бұрын
Can't thank you enough. I was losing my mind lmao
@MrSmoofist4 жыл бұрын
Thank you soooo much!!! But now suddenly my character wont move :/
@m0tix4 жыл бұрын
still, doesn't work. help!!
@mch7 жыл бұрын
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! :)
@24yrukdesigner6 жыл бұрын
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!!!
@andruw50756 жыл бұрын
Same but I took days to find this tutorial
@tolulopemalomo89227 жыл бұрын
Your tutorial is super helpful! There are some unused variables we declared though
@АндрейЧудаков-ы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_crowned4 жыл бұрын
Can you please explain to me what you mean by CameraBase ??? I'm still a noob
@randumbguy47204 жыл бұрын
@@nico_crowned watch the video, the camera base is just a gameobject made guy instructing
@hemachandru48384 жыл бұрын
finnaly after a month a guy found very clear voice very clear code worked for me +1 like earned :)
@burnobad2 ай бұрын
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
@dmd3563 жыл бұрын
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.
@sleepysnowpoff3 жыл бұрын
thank you!
@mmitchell100007 жыл бұрын
I've been looking for, researching, and attempting to rig a camera system to work this exact way, thank you for this tutorial!
@Filmstorm7 жыл бұрын
+Michael Mitchell Most welcome Michael!
@knusperjunge5 ай бұрын
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?
@Filmstorm5 ай бұрын
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.
@knusperjunge5 ай бұрын
@@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
@Filmstorm5 ай бұрын
@knusperjunge great to hear it’s working 👍🏼👍🏼
@knusperjunge5 ай бұрын
@@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
@A93A933 жыл бұрын
Dude so awesome! I had a different collision set up but it made the camera jitter on collision, this works way better!
@oliverscott69135 жыл бұрын
The tutorial may be slightly long but BOI is it worth, you just got a new sub :D
@rishabhlaheja76896 жыл бұрын
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!
@Filmstorm6 жыл бұрын
Awesome Rishabh! Thanks for watching! 👍🏼👍🏼
@rishabhlaheja76896 жыл бұрын
Thanks for such good tutorials!! 😍
@rishabhlaheja76896 жыл бұрын
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
@nggiprayoga4 жыл бұрын
⭐️ 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.
@Filmstorm4 жыл бұрын
Thanks so much for watching 🙏👍🏼
@venomz7682 Жыл бұрын
Best unity tutorial man, so helpful fr
@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 ?
@raisapernu71704 жыл бұрын
Camera turned into 1st per camera and it spins 24/7 :D I have multiple characters to select and I am working on prefabs.
@hugotonelli97177 жыл бұрын
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)
@TyxDemon2 жыл бұрын
I tried finding the person in mention, i dont see them
@hugotonelli97172 жыл бұрын
This thing is not letting me post the answer 😢
@o2Hayden6 жыл бұрын
*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.
@edisyo6 жыл бұрын
Finally, some good tutorial. Appreciate it very much!
@Filmstorm6 жыл бұрын
Thanks Eduards!
@courtneydaniels55595 жыл бұрын
This is the best unity tutorial i have seen. Great work!
@Oxmond4 жыл бұрын
Cool tutorial! Great camera script! 👍🤓
@Filmstorm4 жыл бұрын
Thanks again! 🔮
@paoloolivariguerra3D6 жыл бұрын
Thank you soooo much!!!! You don´t know how long i was searching for this tutorial. !! Greetings and good job!! :D
@offbrandbleach26045 жыл бұрын
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.
@adamcooke35915 жыл бұрын
Camera keeps snapping to a different point please advise on how to fix this?
@vikkosti7 жыл бұрын
Excellent tutorial, I like the small tutorial chunks you do to explain individual elements of unity.
@purpl3grape6 жыл бұрын
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.
@nizar55815 жыл бұрын
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
@nizar55815 жыл бұрын
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
@chessersstudios17784 жыл бұрын
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
@uchihamadara2717 жыл бұрын
Keep making tutorials man, you are awesome!
@AWE_some_ZT4 жыл бұрын
DAMN! You really make the whole thing so easy!!!
@ThePavilionWeb6 жыл бұрын
Great Video, clear instructions, good audio quality, just subscribed and looking forward to following your progress, sharing is caring and its much appreciated!
@Filmstorm6 жыл бұрын
Thanks for watching Chris, means a lot to hear feedback like yours. :)
@AdamSweeney857 жыл бұрын
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?
@MrAllenHBC7 жыл бұрын
Any luck with fixing this?
@AdamSweeney857 жыл бұрын
Nothing yet.
@MrAllenHBC7 жыл бұрын
I fixed it by resetting everything to zero and then moving the camera
@Filmstorm7 жыл бұрын
Hi there, I’ll make a quick step by step article on game dev coding to walk you through how to set this up :)
@Filmstorm7 жыл бұрын
Here you go: www.gamedevcoding.com/unity/camera-collision-system-script/
@AuraController5 жыл бұрын
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!
@lavistro845 жыл бұрын
check your inputs in the update: Mouse X or Y might be inputted twice
@Sharkz-iz6yf4 жыл бұрын
Got it! Thx! Is there a part 2?
@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 ?
@knusperjunge5 ай бұрын
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
@Filmstorm5 ай бұрын
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.
@knusperjunge5 ай бұрын
@@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
@wouwou91463 жыл бұрын
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.
@uhuhyesm4355 жыл бұрын
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?
@Filmstorm5 жыл бұрын
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
@uhuhyesm4355 жыл бұрын
Oh my bad it will go into CameraFollowObj in Camera Base But the error persists
@uchihamadara2717 жыл бұрын
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!
@Onek3i4 жыл бұрын
Do you have a movement script the goes well with this?
@sestareknewgamestar26314 жыл бұрын
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
@hdgraficoscreadordeconteni42805 жыл бұрын
I have learned more with your tutorials in English, than those of Spanish 👍
@fernandopandolfo89234 жыл бұрын
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э4 жыл бұрын
Make sure you attach the script to CameraBase, not the Main Camera object itself
@kayarawasbanlaywa25066 жыл бұрын
Why the camera is just turning ? it doesn't cooperate to my mouse please help me :(
@jeffstone32276 жыл бұрын
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
@Filmstorm6 жыл бұрын
Hi Jeff, I will make a short tutorial to explain how to correctly setup it up under two minutes today 👍🏼
@jeffstone32276 жыл бұрын
Great Thank you!
@HALO360Chris6 жыл бұрын
i got the same issue have you made the vid yet?
@jeffstone32276 жыл бұрын
Have you had a chance to work on the fix yet?
@missasasha2 жыл бұрын
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_tim5 жыл бұрын
Very nice, work on unity 2018 with no problem. I dont have test on my phone.thx for this tutorial.
@youngyeh5 жыл бұрын
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?
@Filmstorm5 жыл бұрын
The character should be on a different layer from the detecting collision raycast layer, this will stop the collision with the player 👍🏼
@youngyeh5 жыл бұрын
@@Filmstorm Thanks for the hint, that helps a lot (btw, what's the difference between Linecast and Raycast ??
@yannick22375 жыл бұрын
@@Filmstorm could you please explain how I do that?
@mohamadjeldeh10944 жыл бұрын
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
@dkordy2 жыл бұрын
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?
@thomaslinger90013 жыл бұрын
Awesome solution, even in 2021! Great job ;)
@FuryFight3r6 жыл бұрын
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-f2p5 жыл бұрын
3:17 listen... he says "it's pretty F.... ehm... simple once you get..." no "FUCKS on this channel lmao ;)
@m0tix4 жыл бұрын
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.
@chenohana23864 жыл бұрын
how did you fixed it?
@m0tix4 жыл бұрын
@@chenohana2386 Move the Cam away from the Base
@andythedishwasher11172 жыл бұрын
float = fractional value, int = non-fractional value
@AsitorCorporation5 жыл бұрын
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.
@gamerszone24967 жыл бұрын
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'.
@Filmstorm7 жыл бұрын
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/
@gamerszone24967 жыл бұрын
aah thank you sir.
@krriz-kzr4 жыл бұрын
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.
@Razgard5 жыл бұрын
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.
@dragonfailrage16635 жыл бұрын
If you solved this issue could you contact me and explain how you did it much appreciated ;)
@Razgard5 жыл бұрын
I'm still working on it. I'll update if I can solve it.
@charlestheninja5 жыл бұрын
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...
@bengreat68894 жыл бұрын
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.
@Filmstorm4 жыл бұрын
Thanks Ben! Yes I can cover this in a future tutorial 👍🏼
@pizzanoscope4ever4514 жыл бұрын
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.
@RegulusFen6 жыл бұрын
Thank you, Though, I am wondering to add a mouse wheel scroll in and out
@brovideolol34884 жыл бұрын
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_guy5794 жыл бұрын
Thanks for helping me out man!
@Filmstorm4 жыл бұрын
Thank you! Thanks for watching!
@ferrismaghi72625 жыл бұрын
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...
@Restrictz5 жыл бұрын
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?
@jd74783 жыл бұрын
thanks so much! i wasted hours on trying to solve the clipping issue myself :D
@MenacingSnail6 жыл бұрын
Great tutorial man, thanks!
@redbeardjunior5 жыл бұрын
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
@tenpovine16684 жыл бұрын
I'm intrigued. Is there a reason why he's messing with the stick's input? for what reason are they being augmented?
@sparx7747 Жыл бұрын
What is Dolly Direction stands for ? (sorry my English is not good) :(
@lockekosta90144 жыл бұрын
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.
@kaineis5 жыл бұрын
Thank you very much. That was exactly what I was looking for as a complete beginner in Unity. :) :)
@ThegamingrealmJr6 жыл бұрын
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?
@tonynealis11656 жыл бұрын
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 ?
@Filmstorm6 жыл бұрын
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 👍🏼
@tonynealis11656 жыл бұрын
OK excellent, ty so much for doing this.
@bogdanzajac78586 жыл бұрын
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 .
@Filmstorm6 жыл бұрын
Does your animation have root motion enabled? This is what allows your character to move correctly. 👍🏼
@bogdanzajac78586 жыл бұрын
In animator of my character i've marked apply root motion but it doesn't change anything...
@sapphireyue13246 жыл бұрын
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.
@lastronomediscount93044 жыл бұрын
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
@Filmstorm4 жыл бұрын
🎉🎉
@nico_crowned4 жыл бұрын
I have the same problem that you had and that change in the code did not work for me ... can someone help me please ???
@geosari17517 жыл бұрын
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.
@Filmstorm7 жыл бұрын
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
@Filmstorm7 жыл бұрын
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-86 жыл бұрын
This is such an excellent solution, thank you so much for sharing!
@nazariomagido5 жыл бұрын
Thank you! This helps a lot, keep up the great work.
@leontius55024 жыл бұрын
It says my follow object is not assigned even though I assigned it in the inspector panel. Why is this?
@mikehang12434 жыл бұрын
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.37843 жыл бұрын
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?
@justinfoland40666 жыл бұрын
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)
@carlose64335 жыл бұрын
you need to reset the rotation of the camera and player to 0's (that's the way i fixed it)
@neonlo5544 жыл бұрын
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 :).
@dadsanddragons8756 жыл бұрын
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.
@Filmstorm6 жыл бұрын
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. 👍🏼
@ngjiayi27052 жыл бұрын
THE BEST VIDEO EVER!!!
@akashiscorner18356 жыл бұрын
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?
@gloid40516 жыл бұрын
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
@RST94135 жыл бұрын
working perfect with what he do in video. but be carreful at input settings to do same. thank you very much!
@H2R_sahil5 жыл бұрын
Than you for such a useful tutorial
@nico_crowned4 жыл бұрын
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 !!!!
@damnbro07075 жыл бұрын
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.
@fabiosimonelli51704 жыл бұрын
public GameObject camera; void update() { transform.rotation = camera.transform.rotation; } idk if it works
@damnbro07074 жыл бұрын
@@fabiosimonelli5170 bro that's like 1 year too late :D
@TheZelanor6 жыл бұрын
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
@Gurem5 жыл бұрын
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.