Collision checking with basic shapes vs. vertex checking

Started by
12 comments, last by superpig 16 years, 10 months ago
Quote:Original post by Domarius
Capsules are useful for humanoids because the rounded tops and bottoms let them slide over little ledges instead of getting stuck on them.

True. I was considering ellipses for that, but capsules will work better.
Quote:
If you don't know why free orientation is useful then you shouldn't bother with it for your game :)

Yep.

Thanks!

Advertisement
Sorry, I thought you were just trying to write an engine - hadn't realised you were actually building a game. In that case it should definitely be guided by your requirements. I was basing my suggestions on a more general-purpose engine, which would definitely need freely orientable collision meshes.

Are you sure you really need all this, though? You could implement per-poly collision detection now, and then use this stuff later to optimize it once you're sure that it's necessary. (That's all that this stuff is, after all - an optimization technique).

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Quote:Original post by superpig
Sorry, I thought you were just trying to write an engine - hadn't realised you were actually building a game. In that case it should definitely be guided by your requirements. I was basing my suggestions on a more general-purpose engine, which would definitely need freely orientable collision meshes.

Are you sure you really need all this, though? You could implement per-poly collision detection now, and then use this stuff later to optimize it once you're sure that it's necessary. (That's all that this stuff is, after all - an optimization technique).


Specialized engine or general game, big difference.

I think it would be a lot easier to write basic shape collision code than it would be to write per-poly collision code. Especially if I want to test for more than just intersection, such as bouncing or sliding. Am I wrong?
Quote:Original post by timmaxw
Specialized engine or general game, big difference.
All you said in your original post was "decent 3D game engine," so I assumed non-specialized engine.

Quote:I think it would be a lot easier to write basic shape collision code than it would be to write per-poly collision code. Especially if I want to test for more than just intersection, such as bouncing or sliding. Am I wrong?
It's probably easier to write bounding-sphere intersection tests than poly-poly intersection tests, sure. But if you wanted the easy option you wouldn't be writing your own engine :P

Something else to consider is the asset pipeline. If you write per-poly support, then you can just throw your models into the collision detection system immediately. If you only support mathematical primitives, then you'll have to provide a toolchain for setting up those primitives before you'll be able to get the models into the game.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement