I just wrote up a blog post showing how to use a PID controller in Unity. I needed this today because I'm making a controller for a hovercraft, and there are so many layers (physics, control response time, etc.) between the virtual controls the AI should be manipulating, and the actual position/speed of the craft, that constructing a controller heuristically would have been quite a pain. PID loop to the rescue! I just threw this in, spent a few minutes tweaking the three constants, and now I have a script that can fly my hovercraft to any desired altitude better than I can do it myself. So, I thought I'd share. I hope somebody finds it useful!