Game Dev Basics: Let's make a Camera Follow Script in Unity using C#

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии •

  • @deewolf1903
    @deewolf1903 5 лет назад +26

    Hands down the best tutorials on RUclips right now. I really appreciate the thoroughness. It feels like we are assembling a project together on the fly, unrehearsed which provides great opportunities to get some debugging experience. Make more!

    • @LostRelicGames
      @LostRelicGames  5 лет назад +6

      I appreciate you took the time to write this. I have had a couple viewers tell me the videos are too long, but I do so intentionally to flesh out the process. I feel the journey is more important than outcome in these learning scenarios. As the skill levels vary, so does the requirements. Thanks for the feedback, it means a lot!!

    • @deewolf1903
      @deewolf1903 5 лет назад +6

      @@LostRelicGames I definitely can appreciate where some may want snappier content, and maybe that's an opportunity to produce some 5-minute quickies. But you're absolutely right that the value (for understanding programming logic and design) comes from the journey and not the destination because we learn the most out of trial and error than we do from just being given an answer.

  • @Andres-lx5ix
    @Andres-lx5ix 4 года назад +16

    I stopped wasting my time trying to be diamond in league of legend and started try to be like you
    thank you so much
    greetings from Chile

    • @LostRelicGames
      @LostRelicGames  4 года назад +5

      I also lost a lot of time playing MMOs in the past, they are fun, but can be life destroying. At a point we must grow up and see life for the marvelous true MMO that it is. Glad to hear you have aligned yourself to something of true meaning. Wishing you the very best mate!

    • @fikriar9739
      @fikriar9739 4 года назад

      lmao, agree but sometime play games give you inspirations :D

  • @axelmatthew1543
    @axelmatthew1543 2 года назад

    Hands down the best tutorial on YT right now, this video help a lot for my citation project from non game dev-beginner game dev. Thank you, keep making another yet good tutorials man, God Bless!

  • @novaplum1617
    @novaplum1617 4 года назад +2

    I mean... I've learned more from watching your videos than any other tutorial on youtube. Seriously, you are awesome.

    • @LostRelicGames
      @LostRelicGames  4 года назад +1

      Thank you NovaPlum, it means a lot to me. Wishing you the very best on your path ahead

    • @novaplum1617
      @novaplum1617 4 года назад

      @@LostRelicGames While writing this code, I'm still having trouble understanding
      endPos.x += positionOffset.x;
      endPos.y += positionOffset.y;
      endPos.z = -10.0f;
      I think I get it but im not 100% sure. What exactly is happening here?

  • @rockinriobrazil
    @rockinriobrazil 5 лет назад +5

    Dude, you explain key elements from gaming development
    in a simple and straightforward way, withou shenanigans. Keep up the good work. Cheers from Brazil.

  • @mistermagnus1836
    @mistermagnus1836 5 лет назад +3

    Cheers! I look forward to checking out blood and mead.

  • @chaosmastermind
    @chaosmastermind 4 года назад

    I'm definitely going to be using this in my future game project.
    Thank you for upping the quality by a lot just through a few basic things I never would have thought of.

  • @CreepyUncleIdjit
    @CreepyUncleIdjit 4 года назад +9

    Love the tutorials, as always. Getting a Tony Stark vibe with those glasses. Looking good. Also, eff you and your beautiful hair.

    • @LostRelicGames
      @LostRelicGames  4 года назад +1

      Lol! Glad you're digging the tutes,. Glasses have since broken! And let's hope the hair holds for a few years yet :) Thanks for the comment mate! have me a good chuckle

  • @mido03
    @mido03 5 лет назад +8

    Keep doing what you do,these videos are very helpful!

    • @LostRelicGames
      @LostRelicGames  5 лет назад +1

      Thank you Mido, there is a lack of easily digestible tutorials out there, doing my part to give back to the community!

  • @timotheerabaud5411
    @timotheerabaud5411 5 лет назад +4

    Very nice tutorial ! I like your tips it helped me a lot on my game dev as I am really struggling with code on c# !

    • @LostRelicGames
      @LostRelicGames  5 лет назад +3

      Thanks so much for this comment, I'm glad I managed to help you. This is my primary motivation. I might do some c# specific videos!

    • @LostRelicGames
      @LostRelicGames  5 лет назад +4

      Also thanks and congrats on becoming my 600th subscriber 😎🤙

    • @timotheerabaud5411
      @timotheerabaud5411 5 лет назад +1

      @@LostRelicGames Cheers to that :D

    • @timotheerabaud5411
      @timotheerabaud5411 5 лет назад +1

      @@LostRelicGames That would be great! I was wondering if you had any knowledge and tips on making a multiplayer game on the same screen 2D type of game ! Thank you.

  • @KoiroShi
    @KoiroShi 5 лет назад +10

    YES! Just what I needed!

    • @LostRelicGames
      @LostRelicGames  5 лет назад +2

      I'm glad to hear that Tomo! If you run into any snags, jump on the discord!

  • @ryevrcls578
    @ryevrcls578 5 лет назад +2

    until now i cant believe that Keanu is a game Dev xD!

  • @kingdomsteve
    @kingdomsteve 3 года назад

    Great tutorial, thank you so much!

  • @michelplante2280
    @michelplante2280 4 года назад +2

    Thank you very much for sharing! This helped a lot!

  • @sanchez00253
    @sanchez00253 4 года назад

    thanks so much for the video.really interesting. i really love different possibility of coding the same effect. thanks.

    • @sanchez00253
      @sanchez00253 4 года назад

      @@error2802 you can use CineMachine, with no script, but the the things is not simply using what other persons have developed but understand why and how things works.This is the reason i follow this youtube channel. i used this camera follow and it works perfectly but, more important, is what i learn in the process.

  • @Kaoji
    @Kaoji 4 года назад

    Your video rock and help a ton. Thank you so much!

  • @CreepyUncleIdjit
    @CreepyUncleIdjit 4 года назад

    I was using a static background, and damn was it jarring with this camera! Disabling my background helped with the motion sickness. Still, that background following the camera was slick.Now to find a camera bounding tutorial...

    • @LostRelicGames
      @LostRelicGames  4 года назад +1

      Awesome man! Yeah i know that static BG look well haha. And sounds like you have something fun in the works!

    • @CreepyUncleIdjit
      @CreepyUncleIdjit 4 года назад

      @@LostRelicGames I'll upload a few gifs to the discord so you can get an idea. I modified some of the punches and kicks.

  • @adidasboi4216
    @adidasboi4216 5 лет назад

    Thank you so much! a great tutorial and very easy to follow :)

  • @wonghinn7934
    @wonghinn7934 4 года назад

    thanks bro , u giving me a great tutorials

  • @LawMasterTimmy
    @LawMasterTimmy 4 года назад +4

    Hello great tut, but when my player moves the sprite of the player is a bit jittery is there a way to fix this?

    • @bubbledev4004
      @bubbledev4004 4 года назад +1

      lerp is not really good try another method

    • @LawMasterTimmy
      @LawMasterTimmy 4 года назад

      @@bubbledev4004 I fixed it

    • @samp4805
      @samp4805 4 года назад

      @@LawMasterTimmy Can you explain how, please?

    • @LawMasterTimmy
      @LawMasterTimmy 4 года назад +3

      @@samp4805 It has been a while since I have word on my 2d game. I think I went into unity project settings and changed the fixed time step to either a lower number or a bigger number, you just need to play with it.

    • @anisonekushim2288
      @anisonekushim2288 4 года назад

      @@LawMasterTimmy bro you've just saved my life, i searched everywhere for this

  • @LeonSloma
    @LeonSloma 4 года назад +1

    thank you game dev keanu

    • @s_ubin1012
      @s_ubin1012 4 года назад

      Underrated comment 😂🤣😂

  • @huylyN
    @huylyN 5 лет назад +9

    Can you make a video about CUSTOMIZATION MENU

  • @depopa1033
    @depopa1033 4 года назад

    thank you for the tutorial keanu reeves

  • @HalcyonVoid
    @HalcyonVoid 4 года назад

    Instead of assigning the player to the camera, is there a way to have the player grab the camera? Or at least have the player auto assigning itself to the camera on load?
    My goal is to have several different "characters" with different control sets that you can switch through. I guess you can look at it like Trine in terms of functionality I am looking for.

  • @greyenbee9049
    @greyenbee9049 4 года назад

    very easy to follow. good tutorial

  • @TheStreamReel
    @TheStreamReel 5 лет назад +3

    First of all. thanks for the tutorial, your videos are helping me create my first game. When using the lerping method when playing the game I developed a motion blur like effect on my sprite. This did not happen when I used the first method shown. Any ideas of why this happened? Any help would be appreciated

    • @LostRelicGames
      @LostRelicGames  5 лет назад

      I've never seen this before. This sound like it could be a monitor refresh issue. See this discussion on unity forums:
      forum.unity.com/threads/fast-moving-objects-in-2d-horrbile-ghosting-blurring.281263/

  • @bortsmith1983
    @bortsmith1983 5 лет назад +1

    Really Like It but I want that The Background Changes over The Time. How can I do this? Should I use Cinemachine?

    • @LostRelicGames
      @LostRelicGames  5 лет назад

      You mean background parallax? Not so simple, there is a process. I don't personally use cinemachine, but I don't think it manages background shifts

  • @MrSpiky
    @MrSpiky 5 лет назад +1

    I like your simple logo

  • @thanhlongtran9163
    @thanhlongtran9163 4 года назад +1

    I think you should use lateupdate instead of update because sometime after the camera update its position the player move and it will look really weird. Lateupdate runs after update and the camera will always update after the player move.

  • @zerostudio5822
    @zerostudio5822 4 года назад +1

    Thanks lost relic for this tutorial. I have created one MetroidVania you can create one script for MetroidVania?

  • @lukasmerta8244
    @lukasmerta8244 5 лет назад +2

    thank you soo much !

  • @keithmichelson7634
    @keithmichelson7634 Год назад

    Do you still do it this way? Cinemachine is always hard to have it look consistent with different screen sizes.

  • @catygau
    @catygau 4 года назад

    thanks thats perfect, i love it !

  • @OddKidToons
    @OddKidToons 5 лет назад

    QUESTION: How can I keep him from double jumping when he lands if I am still holding the up key. For example jumping to a platform. If I jump through it, he will double jump when his collider reaches the top of it automatically.

    • @janfeyen592
      @janfeyen592 5 лет назад

      tried the Input.GetKeyDown variation? it activates by button press rather than button hold (GetKey)

  • @4F6D
    @4F6D 4 года назад

    Could you make a Metroidvania-Style Camera? That would be extremely awesome.

  • @somemore9784
    @somemore9784 5 лет назад +1

    Thanks Neo.

  • @Losho
    @Losho 5 лет назад +1

    OMG! Keanu reeves! ♥

    • @LostRelicGames
      @LostRelicGames  5 лет назад

      Lol, I have heard this a few times this month! :D

  • @Chargak
    @Chargak 4 года назад +1

    If anyone else finds that their character starts shaking when using the lerping camera: Changing to a FixedUpdate and Time.fixedDeltaTime instead of Time.deltaTime fixed it in my case.

    • @AP-hb2qw
      @AP-hb2qw 4 года назад +1

      THANK YOU - no more ghosting. To summarize an article I read: "void Update()" is used for more for logic, while "void FixedUpdate()" is used more for animations.

  • @lanayaassasin5373
    @lanayaassasin5373 3 года назад

    This doesnt work i dont know why I even drag my player to that camerascript. There is no error but its not folliwng the character.

  • @Adkinsy85
    @Adkinsy85 5 лет назад

    How to Make enemy block player attack's when player press the attack button ?

  • @alikaangul5602
    @alikaangul5602 4 года назад

    The animation for my character is slightly jittery for some reason can anyone help me?

    • @LostRelicGames
      @LostRelicGames  4 года назад +1

      Hey It's related to the pivot point position for each frame inside the sprite editor. They can be moved manually, or a 3rd party tool like texture packer can be used

    • @alikaangul5602
      @alikaangul5602 4 года назад

      @@LostRelicGames thank you very much

  • @projectg9747
    @projectg9747 4 года назад

    Why not using cinemachine?

    • @LostRelicGames
      @LostRelicGames  4 года назад

      Cinemachine is a black box, useful, but sometimes a custom approach give a more control

  • @fahadfida6695
    @fahadfida6695 5 лет назад

    Thank you! :)

  • @Pastanaut
    @Pastanaut 5 лет назад +2

    Awww yeahhh

    • @LostRelicGames
      @LostRelicGames  5 лет назад +1

      Nice to see ya Matty, may you find this one useful!

  • @arunprksm
    @arunprksm 4 года назад +1

    hard hands...saddest keyboard...🙉 ear pain...😢😢

  • @temwed42
    @temwed42 4 года назад

    let me get the copy and paste lolol

  • @soundcat2538
    @soundcat2538 3 года назад

    Lol, why do you have bettermarks?? Are you a teacher?