Hacker News new | ask | show | jobs
by sz4kerto 4068 days ago
In short, you're pushing the ball around, and the force you use depends on three things:

- how far the ball is from the target (P, proportional)

- how far the ball has been from the target over time (I, integrator), so if you are very far even after a long time you try to push harder

- how quickly is the ball approaching the target (D, derivator), i.e. if you're approaching quickly then you decrease the force, if you're approaching too slow then you increase the force