Author Topic: Spherical camera collision  (Read 2046 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Spherical camera collision
« Reply #15 on: September 27, 2012, 11:21:36 pm »
Replace this line
Code: [Select]
SimpleVector direction = new SimpleVector(1, 0, 0.5f);for this
Code: [Select]
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Spherical camera collision
« Reply #16 on: September 27, 2012, 11:46:08 pm »
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.