handling collisions

Started by
4 comments, last by GameDev.net 23 years, 10 months ago
if you're going toward a wall at an angle. you make the velocity for the direction perpendicular to the wall equale zero and leave the others alone.
v- wall
|
|/ <- -x, -y
| | <- x=0, -y
| |
Advertisement
I am having some serious issues with handling player collisions in my 3d world (FPS type). I am able to detect the actual collisions with the objects and their respective polygons, yet am unable to accomplish the 'sliding' mechanism that I would like. How is it done? How do you slide the player along in the appropriate direction.
I have heard that you should project the players direction vector along the poly's normal onto the poly to generate two new points, and then use the new vector value and add(?) it to the player position? How do you do this stuff? Very confused. Please help if you can....
That seems to be an interesting approach although it seems quite limited in its applicability. If a wall is not aligned perfectly with an axis (imagine a wall rotated 45 degrees around y where the normal components are equal across x and z), it seems to fall apart a bit. Besides, I need this to work for objects other than just walls. I would like it to be a more general purpose algorithm. There seems to be some merit to your idea for many cases though and I will look into it. Any other ideas or equations out there?
Did you get this working yet?

I''m after the same effect with no sucess!

Get a normal of the plane, then after you hit the wall at let''s say 45 degrees, move the camera/player''s bounding box or position back along the plane normal. After that the player will move foreward again thus check for new collision and after that move the player back along the plane normal again and repeat.

my homepage
E-Mail: BlueOrbSoftware@mailcity.com

work, dammit!
how do you do this stupid thing? html
cool! it works! (sorry, first graphical post)

anyway, if you check out my posted 3d collision response post, i think one of the responders meant something like this. check out the thread, and see if you understand it.

a2k


Edited by - a2k on June 10, 2000 2:23:31 AM
------------------General Equation, this is Private Function reporting for duty, sir!a2k

This topic is closed to new replies.

Advertisement