Smooth Camera Follow in Unity - Tutorial

preview_player
Показать описание
In this video we make a smooth camera movement.

····················································································

········································­­·······································­·­····

Edited by the lovely Sofibab.

········································­­·······································­·­····

► All content by Brackeys is 100% free. I believe that education should be available for everyone. Any support is truly appreciated so I can keep on making the content free of charge.

········································­­·······································­·­····
♪ Baby Plays Electro Games
Рекомендации по теме
Комментарии
Автор

Hey! Explanation:
Lerp is NEVER good for moving targets! The jitter is not from LateUpdate, it's because the Target is moving, this means it takes the 1/8 of the old position but the delta between the old and the new 1/8 of the new position causes the jitter

Just use Vector3.SmoothDamp, after years i've found this function and now I have no jitter at all!

SinanAkkoyun
Автор

If you are tracking a rigidbody, you can still use LateUpdate, but change the "interpolate" property of your tracked rigidbody to interpolate. The jitter is caused by differences in when the rigidbody and camera positions are updated. From what I've tested, Lerp still works perfectly fine.

SamHogan
Автор

Thanks!
I've been dev coding an RPG for a little while and really struggled with camera controls. The addon you mentioned is very expandable, and even allows you to impliment lock-on, which is a feature I love. Find the closest object near the center of the camera viewport and snap to it as the next camera target.

lupinedreamexpress
Автор

Thank you, this tutorial was helpful. I don't use the Unity engine, but I found that this tutorial's information was fundamental enough to be transferred to any setup.

RoboHighlights
Автор

Thank you exactly what i needed for the On rails game i've been playing around with. i needed a way to make my player and camera follow the target at different speeds smoothly and this is perfect.

FrvrTmrrw
Автор

thanks so much!! I used LateUpdate, and everything felt so much smoother! even the jumping felt smoother!

coolboidoesstuff
Автор

Works like a charm for my top view project. My camera used to be all jumpy when switching through scenes. Many thanks!

sudagatz
Автор

I just started watching your videos, and you have so much knowledge on this and great production quality keep up the amazing work!

jacobwilson
Автор

Very useful stuff! The only time I had to code camera movement was for a game project during college. It was jittering so much, I had no idea how to fix it (I could've just asked my professor for help, but well), and from then on I was scared to tackle this task again. Your tutorial helped a lot and made me realize how easy it actually is to setup camera movement. Thanks a lot!

orlanswf
Автор

What if you want to lock the camera on the player in a top view. Like how do you rotate the camera? What line of code would I add?

jaridkeen
Автор

Impressive tutorial, this makes me more excited about learning unity!

satobi
Автор

This will definatley help me with my Oddworld fan game I'm working on. Thanks for the video!

Sam_Locke
Автор

dude, your voice is amazing!, so is your tutorials and explanations you make everything seem easy, thanks man and your smiles tho

rrrush
Автор

ultimate video about this as always. searched everywhere for this and you gave such a quick and complete explanation. thank you!!!

anshukrishan
Автор

These videos are quality content and really helpful, thank you!

williamspicher
Автор

3:54 "I can do the same thing with my wife and my ex" XD

kressckerl
Автор

Excellent tutorial, so clear and to the point

QFGEE
Автор

Love these "quick tips, " keep them coming!

jdmclatcher
Автор

Thank you for this simple and powerful tutorial!

ucagdascoskun
Автор

Thanks for the Video! I was able to comprehend almost everything (not usual for me) cause i had seen your How To Make A Game Tutorial! <3

RegahP