How can you deflect a direction/magnitude vector based on a direction/magnitude vector and a collided triangle?

Posted by JeanOTF on Stack Overflow See other posts from Stack Overflow or by JeanOTF
Published on 2011-01-01T19:17:07Z Indexed on 2011/01/01 19:54 UTC
Read the original article Hit count: 179

Filed under:
|
|
|
|

So, I have a Triangle->AABB collision algorithm and I have it returning the triangle that the AABB collided with. I was hoping with the 3 vectors of the triangle and the direction/magnitude of the movement would let me determine a deflected vector so that when you run against the wall at an angle you move slower, depending on the angle of collision, but along side the wall. This would remove the sticky collision problem with only moving when there is not a collision. Any suggestions or references would be greatly appreciated! Thanks.

© Stack Overflow or respective owner

Related posts about c++

Related posts about graphics