How To Create A PID Controller In Unity

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 26

  • @isaacs1217
    @isaacs1217 3 роки тому +5

    absolutely fascinating... you're awesome dude, deserve waaaayyyy more than those 483 subs you have... looking forward to new vids man! :3

    • @Tvtig
      @Tvtig  3 роки тому +1

      Thanks so much for your support!

    • @isaacs1217
      @isaacs1217 3 роки тому

      @@Tvtig no problems!

  • @silvorthegrand6976
    @silvorthegrand6976 3 роки тому +2

    Fun to watch, informative, and great editing. You gained a sub my friend. (Why is this guy not more popular?)

    • @Tvtig
      @Tvtig  3 роки тому

      Thank you so much, really appreciate the support!

  • @hefferwolff3578
    @hefferwolff3578 4 місяці тому

    This was fantastic for a missile!

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

    Man this saved me a lot of time with controls thank you so much!

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

    Just what I needed, thanks for explaining this. I read the article before finding this video but this was much better :).
    One thing, the code in the repository has an error. You're getting the direction vector with (origin.position - target.position) and it should be the other way around. It was an easy fix but I thought you should know. (I'm guessing that's why the thrust forward vector had to be inverted)

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

      Ahh good spot! Thanks for letting me know, I'll update it in the code. I'm really glad you found the video useful :)

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

    Thanks for this, I used your PID script in a drone game. It is now controlling the drone thrust!!!

  • @backbenchgamedev4117
    @backbenchgamedev4117 3 роки тому +5

    Nice - to the point - concise and informative!

  • @mutterings
    @mutterings 3 роки тому +1

    Inspiring video!

    • @Tvtig
      @Tvtig  3 роки тому

      Glad you think so!

  • @S-Lomar
    @S-Lomar 2 місяці тому +1

    Thanks for sharing 😍🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩 1:12

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

    Vector3 rotationDirection = Vector3.RotateTowards(transform.up, targetDirection, 2*Mathf.PI, 0.00f);
    it should be in radians not in degree

  • @MM-oh3vr
    @MM-oh3vr 2 роки тому +1

    The upwards glitch looks like the singularity when using Euler Angles. You should better stick to Quaterions directly

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

      Great thought, maybe I'll revisit it at some point!

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

    This was really good!! I have a question, let's say I want to push an object to face a particular direction using forces without any back and forth movements. I could simply remove the integral portion from the equation? Or is there more complexity to it. I'm planning on building something similar for a space game regarding ship AI and want to move AI around the world using forces, but still stopping at particular locations. As well as facing objects for warping to them.

  • @mikekozlov3484
    @mikekozlov3484 3 роки тому

    Thanks for such a great tutorial! I got a question, why do you have Range(-10, 10) for multipliers in PID? Does it make sense to have negative multiplier?

  • @creasu124
    @creasu124 3 роки тому

    This is really nice, I do hope there is a fix for the rotation on the z axis going wild.

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

    Very cool 😊

  • @carlbarker2457
    @carlbarker2457 3 роки тому

    dude this was very helpful

  • @mikekozlov3484
    @mikekozlov3484 3 роки тому

    And if you find a solution for flying directly up glitch, please, post it!

  • @october_fest
    @october_fest 3 роки тому +1

    Oh God not another two character name guy... Please name variables in a readable way.

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

      he isn't a two character name guy.