6/01/2006

Collision Detection

The last couple of days I've been working on the collision detection. I am going for the sphere -> triangle approach, and I'll represent the collision hull for characters using multiple spheres that are stacked on top of each other. At
work (before our engine was brutally murdered and replaced whit some ever famous fps engine), we used to use one ellipsoid to represent a character. This worked fine, and it wasn't much harder to progam than the sphere test either, for we just scaled the whole situation to a sphere triangle test, but it had one major drawback: You wouldn't be able to do collision detection against rotating objects, that were rotating around any other axis than the y axis. (Because that would scale to a situation where the triangle has to morph over time. And believe me, that's not something you want to make a collision test for).
In my engine, I want to be able to have objects rotate in all possible ways, so I went for the sphere approach.

I've got the sphere -> single triangle test working already. It went actually pretty well. I used the same algorithm we used at work before, so I know it's a working and stable algorithm, but it still is a tricky to implement (I didn't have any reference whatsoever, only what's in my head). Anyway, I've implemented it, and tested it, and it seems to be working fine, even all special cases I've tested didn't show any problems.

Tonight I'm gonna continue on a CollisionTree to speed up collision testing against a wolrd that contains many polygons It's definitely gonna be very cool, so stay tuned!

posted by Lieven 13:31


Other Bloggers
  • nervedemosystem
  • Boson
  • Walter Tamboer
  • Eternal lands development
  • walter still rules
    Cool Projects
  • Mono, .NET for linux n co
  • OGRE
  • walter still rules