// CoR penetration fix, adds the jitters
// from center to point
- //Vector2 CollP = normal / normal.Length * Ball.Radius;
- //Ball.Position = Info.Point + CollP;
+ Vector2 vecCollP = vecNorm / vecNorm.length() * pBall->radius;
+ pBall->applyNudge(cInfo.point + vecCollP - pBall->positionRaw());
}
bool getInfo(const Ball* b1, const Ball* b2, CollisionInfo* pcInfo)