Press go.
100% by me. Thanks to ChatGPT for some formulas and a YouTube video for explaining what this was to me. All code is by me though. HOW IT WORKS: Error: The distance between the target and the current state. P: Proportional, how much it moves proportional to the error. (Larger error means larger P) I: Integral, the total of its error. (Each frame it adds the error to itself, which means it eventually cancels itself out) D: Derivative, the distance between how much it moved last time, and how much it will move this time. (The faster the speed changes, the more D will resist) Now I know that this seems like a bad way to get something to a target point, but it is mainly used in robotics, where you can't simply say "point towards blah blah blah". Instead, you have to ease it into position, and this is a pretty good way to do so.