I finished reading this paper, and I almost completely implemented the technique as well. I got a few questions:
(note that I'm still working with spheres, not ellipsoids)
1. In line 47, in the collision response algorithm:
// only update if we are not already very close
// and if so we only move very close to intersection..not
// to the exact spot.
if (collisionPackage->nearestDistance >= veryCloseDistance)
{
VECTOR V = vel;
V.SetLength(collisionPackage->nearestDistance - veryCloseDistance);
newBasePoint = collisionPackage->basePoint + V;
// Adjust polygon intersection point (so sliding
// plane will be unaffected by the fact that we
// move slightly less than collision tells us)
V.normalize();
collisionPackage->intersectionPoint -= veryCloseDistance * V;
}
Why is it needed to move close to the intersection point and not exactly to it?
2. I'm having an issue that causes my character (the sphere) to get into the triangle a little bit, before reaching the "desired" slide plane and stopping that bug. After some debugging, I'm almost sure that this is a floating-point precision issue.
Say the triangle is on the Z axis, in z = -5 , and my sphere (a unit sphere with radius=1) bums into it, its initial "stop" position is at z = -3.85~, and then it slowly reaches the desired -4 (and stops there, as desired) after a few seconds.
I'm working with floats, but I don't think that switching to doubles will fix the issue. Any idea?