Spherical camera collision

Started by Thomas., September 21, 2012, 06:49:40 PM

Previous topic - Next topic

Thomas.

Replace this line
SimpleVector direction = new SimpleVector(1, 0, 0.5f);
for this
SimpleVector direction = new SimpleVector(1, 0, 0);

It should be the same, right? Ellipsoid collides with wall at left side (in front of the camera), so speed should be approximately same in both cases?

EgonOlsen

I see what you mean, but i don't see the problem with that behaviour. With that additional translation, you are moving the ellipsoid right and into the back wall at the same time. The resulting translation vector reflects that. It might be a little shorter in total than the initial vector because of the threshold and the recursion depth and maybe some inaccuracies in the process, but i don't see why this should be a big deal. It's an artifical problem...if you use this approach in a fps game (take a look at the fps example for example), you won't notice any problems of that kind.