def correction(self, target):
        "Create a force towards the direction of the target."
        target.magnitude = self.MAX_SPEED
        return (target - self.velocity).limit(self.MAX_FORCE)
Create a force towards the direction of the target.
recipes/Python/578007_processing_DEMO_Boids/recipe-578007.py