Original Post
Hello all. I've finally had some success in getting my BB's and my world polygons to collide, as well as getting BB's to collide with BB's( after trying lots of stupid algorithms and redoing SAT a bunch of times ) . I am pleased with the 3D collision detection, but now comes the question: what do I do with it? From what I can see in most games where you have the usual 'WASD' + jump controls, running into a wall/entity doesn't always entirely stop your motion. If you are running directly into the normal of the wall, you don't move at all. But, if you are coming at an angle to it, you still move along the wall, though at a slower speed. My guess is that they take the dotProd of the wall normal and the motion vector, then add them together( should be negative ) to cancel out the "normal component" of the motion vector. If you're running right into the wall, that would be everything. If you're barely angled into it, that would be almost nothing. This would result in that "sliding along the wall" effect that seems to be pretty standard. Also, it would have the nice side effect of allowing me to move up ramps with the same old motion vector I've been using. Does this sound about right? Or dead wrong? Are there other 'basic collision responses' that you guys know about? I'm all ears. Thanks, jujumbura