How to move objects in Unity (3 methods)

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

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

  • @MyPing0
    @MyPing0 2 года назад +36

    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 года назад +5

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

  • @janashraf1545
    @janashraf1545 8 месяцев назад +4

    Most underrated unity tutorial RUclips 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 5 месяцев назад +1

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

  • @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!

  • @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

  • @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. :)

  • @KhonakdariDev-ks5bx
    @KhonakdariDev-ks5bx 7 месяцев назад

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

  • @andrewdoesit.
    @andrewdoesit. 7 месяцев назад

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

  • @St3fa9s
    @St3fa9s 9 месяцев назад

    Love these types of videos! :)

  • @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

  • @poojvin
    @poojvin 11 месяцев назад

    Very mathematical yet simply explained. Thank you.
    Question: If I have an object that is say at eye-level of player A who is 5 ft 5", how do I dynamically place the object at eye-level of Player B who is say 6 ft tall?

  • @soufianebenamer7585
    @soufianebenamer7585 2 года назад +1

    What a great explaination , thank you for this amazing tutorial

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

    Thank you so much! You are a great teacher.

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

    This, and your blog are amazing

    • @GameDevBeginner
      @GameDevBeginner  2 года назад +1

      Thanks so much! Glad you like the blog too.

  • @sxsignal
    @sxsignal 7 месяцев назад

    @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  7 месяцев назад +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

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

    Amazing video dude!

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

    Outstanding content to say the least, thank you very much

  • @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.

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

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

  • @misal-isahabe5281
    @misal-isahabe5281 7 месяцев назад

    Thanks

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

    Thank u so much

  • @huhu....
    @huhu.... Год назад +1

    nice!!!!

  • @govindvijay
    @govindvijay Год назад +1

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

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

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

  • @m_rizaal
    @m_rizaal 8 месяцев назад +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  8 месяцев назад

      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 8 месяцев назад

      @@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

  • @userbunny14
    @userbunny14 28 дней назад

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

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

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

  • @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

  • @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.😘

  • @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 ..

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

    otimo video

  • @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.

  • @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 .

  • @Hex-.
    @Hex-. 10 месяцев назад

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