How to move objects in Unity (3 methods)

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 53

  • @hunter-ci7dk
    @hunter-ci7dk 14 днів тому

    OMG this is like the single most useful video in all of youtube related to Unity!

  • @MyPing0
    @MyPing0 2 роки тому +37

    Dude I wish I could just tell the whole world about your videos. Don't stop making them I know you will blow up one day! They are so informative, concise, and cover all basis.
    I'm really starting to get into Unity and I want to make my own games as a hobby and your videos are perfect for me to learn about various topics. They are just so well made that it hurts to see you're not the biggest unity youtuber out there. I wish you best of luck in your youtube career, thanks for always making such interesting and helpful videos.

    • @GameDevBeginner
      @GameDevBeginner  2 роки тому +6

      Thanks so much! I'm really happy to hear the videos are helping you. Good luck with whatever you make!

  • @janashraf1545
    @janashraf1545 9 місяців тому +4

    Most underrated unity tutorial UA-cam channel I have ever seen

  • @Tetribution
    @Tetribution 2 роки тому +8

    I love this channel, I just learned to work on unity as a gamedev - and all of this is super great. Please don't stop uploading!

  • @markorossie9296
    @markorossie9296 2 місяці тому

    This was clean, simple to follow, useful. Thanks.

  • @mr-pr0cesss
    @mr-pr0cesss Рік тому +1

    Fantastic video, First I read the article about movement in unity in your site, It was amazing and I fully understand it and then saw your youtube channel. Man what you are doing is awesome! hope you get more subs soon and good luck.

  • @onnibools
    @onnibools 6 місяців тому +1

    Yo thanks so much! This really helped me as a beginner!

  • @alexandertrembach7415
    @alexandertrembach7415 Рік тому

    Thanks for this video, simple explanation of functions and a little bit of math, makes repeating this examples very easy, and more than that I am understand what and why I'm doing

  • @daesereg2657
    @daesereg2657 2 роки тому

    I just found out about your channel today. From your blog. This, and your blog are amazing, and they have helped me move on with my projects! You are amazing! Thank you!

  • @FrotteeVDH
    @FrotteeVDH Рік тому

    I'm in the process of watching all of your videos - this is high quality stuff, thanks for creating these. Btw: I saw what you did there with the normali(z/s)ed spelling. :)

  • @naimmop4481
    @naimmop4481 Рік тому

    Great Informative video! I've been struggling with trying to understand why different tutorials have different ways of moving objects. This video really helped me learn what unity is and has been helping me get out of tutorial hell

  • @andrewdoesit.
    @andrewdoesit. 7 місяців тому

    That was the best video ever Thank you such a great explanation

  • @KhonakdariDev-ks5bx
    @KhonakdariDev-ks5bx 7 місяців тому

    thank you very much . I stopped somewhere، and you saved me.

  • @soufianebenamer7585
    @soufianebenamer7585 2 роки тому +1

    What a great explaination , thank you for this amazing tutorial

  • @St3fa9s
    @St3fa9s 10 місяців тому

    Love these types of videos! :)

  • @luiscerda4031
    @luiscerda4031 Рік тому

    Thank you so much! You are a great teacher.

  • @HOSTRASOKYRA
    @HOSTRASOKYRA 2 роки тому

    This, and your blog are amazing

  • @regys9521
    @regys9521 2 роки тому

    Outstanding content to say the least, thank you very much

  • @runrajrun
    @runrajrun 2 роки тому

    Amazing video dude!

  • @halfbakedproductions7887
    @halfbakedproductions7887 Рік тому

    The problem I found with Vector3.Lerp and dividing the elapsed time by the movement duration is that the speed is inconsistent. Move a long distance and the object will slide very quickly, move a shorter one and it'll move at a walking pace.
    If you want to move everywhere at the same speed then you want to be using something else.

    • @GameDevBeginner
      @GameDevBeginner  Рік тому

      Absolutely! Lerp works well when time is the factor you want to control, not speed. Otherwise Move Towards, or Translate are better.

  • @userbunny14
    @userbunny14 Місяць тому

    soo there's no hotkey to just hold, click the object and free move it like in blender?

  • @govindvijay
    @govindvijay Рік тому +1

    my object moves opposite direction , using negative x axis in transform postion ,object moves towards right instead of left side

  • @Ingo.Mclean
    @Ingo.Mclean 8 місяців тому

    @GameDevBeginner great explanation. I'm actually trying to read in data from a data file of a drone, whose time step in recording is .02s, so parsing the data and then in a coroutine reading a line in a while loop. While it works, the timing is a tad slower then realtime. I'm using the transform.position to lerp (and slerp with rotation roll/pitch/yaw). since physics is roughly .016 should I move to fixed update vs a coroutine? (I ingest all the data beforehand into an array to eliminate IO file read calls, which are expensive in time)

    • @GameDevBeginner
      @GameDevBeginner  8 місяців тому +1

      Yeah, Fixed Update might be worth a try since you can enable interpolation on the rigidbody which should smooth out the movement. Make sure to change the physics step to match the recording time step

  • @arthurianacademy1715
    @arthurianacademy1715 Рік тому

    the bolt setp is not getting install in my 2019 version what to do

  • @m_rizaal
    @m_rizaal 9 місяців тому +1

    Please help
    I have been using transform for my movement and its an endless runner but the movement looks really bumpy and it clearly shows that its travelling each unit, its not smooth at all
    I tried rigidbody and its way much smoother but I really dont want physics
    Moreover rigidbody lessens the speed of my game when i use post processing gloom
    If anyone can then please give a solution to movement and a solution to optimise post processing will also be appreciated

    • @GameDevBeginner
      @GameDevBeginner  9 місяців тому

      Assuming you're already scaling by delta time and not doing anything else that might cause jerky movement, have you tried building the game? Sometimes movement that looks jerky in the editor is smooth in the standalone player.

    • @m_rizaal
      @m_rizaal 9 місяців тому

      @@GameDevBeginner No I havent yet build it, I will check if its smooth in my phone
      Thanks for such a quick response!
      And is there any way to optimise post processing cuz it visually decreases the speed of my rigidbody movement when i use gloom

  • @misal-isahabe5281
    @misal-isahabe5281 7 місяців тому

    Thanks

  • @huhu....
    @huhu.... Рік тому +1

    nice!!!!

  • @miguelandradebr
    @miguelandradebr Рік тому

    Hello Very nice!
    Its possible to download the samples?
    Thanks

  • @Jose_diazlife
    @Jose_diazlife Рік тому

    Thank u so much

  • @AlisdairAlbert
    @AlisdairAlbert Рік тому

    I don't know .. I tried this vid and many others .. but unity keep showing error and I can't even move a box... it even shows "transform" or "time" as undefined context... 3 days am trying to figure this out ..

  • @JollyJoker777
    @JollyJoker777 Рік тому

    Thanks for the helpful video! What color theme are you using for Visual Studio?

  • @heavensfield494
    @heavensfield494 Рік тому

    I have a question though, what if I want to move/use the rigidbody with a specific condition (key press for example). Do i have to always use a bool to check if the key is press and then change it in the fixUpdate or is there any other way. I tried recreate my own gravity/ rigidbody but now i ended up with lots of "seemingly unecessary" booleans. Anyone?

    • @GameDevBeginner
      @GameDevBeginner  Рік тому

      Generally, yes. If you're applying physics movement over time, then it should be in Fixed Update, and if you're checking for input with the old Input Manager, then that needs to be in Update, otherwise you will probably miss inputs. A different way to do it might be to share movement values between the two with a Vector3 instead of a bool.

  • @Baron-rr4bt
    @Baron-rr4bt 2 роки тому

    I'm curious. What tool is used to draw the mathematical functions in the video. Can you share it with me?😘

    • @GameDevBeginner
      @GameDevBeginner  2 роки тому +1

      I use Pixelmator Pro & Procreate to make the artwork in my videos

    • @Baron-rr4bt
      @Baron-rr4bt 2 роки тому

      @@GameDevBeginner Thanks,you are so good.😘

  • @AbachiriProduction
    @AbachiriProduction 2 роки тому

    hi im currently using transform component u cen see the code in my last video . but now i want to use the object axies not the world axies, i f u can help .
    if i found what i want in some other place i will post in in my channel .

    • @AbachiriProduction
      @AbachiriProduction 2 роки тому

      i found the solution
      b.transform.position = a.transform.position + (a.transform.forward * 0.5f) + (a.transform.up * 0.5f) +(a.transform.right * 0.5f) ;
      u can change 0.5f to the value you want . i will do a videio about it next few days folow me if you wana know more about it and about my game .

  • @MyPing0
    @MyPing0 2 роки тому

    Came back to this video to request a video topic!
    Any chance you can make one about scriptable objects? They've been confusing me for so long, I mean I've never tried to do anything with them (maybe cause I don't need to yet) but I feel like they are really good to know and use when appropriate, every tutorial I've watched about them though seems hard to follow/understand.

    • @GameDevBeginner
      @GameDevBeginner  2 роки тому +1

      The video I'm working on now touches on scriptable objects, but I might do an expanded video as well in the future.

    • @MyPing0
      @MyPing0 2 роки тому

      @@GameDevBeginner awesome, can't wait for it

  • @trillobit3sIndieGames
    @trillobit3sIndieGames Рік тому

    otimo video

  • @Hex-.
    @Hex-. 10 місяців тому

    litteraly nothing helps i just need to know how to move an object i love the part when u explain