sharp corners
FPS Game.
i use closest point for all my lines in my polygon (lots of connected lines A-B points)
when my sphere has a distance smaller than <= 2.5f (radius) there is a hit.
when there is a hit i take the unit-vector from a-b and start sliding(setting new direction vector for player), forward or backward depending on the angle against the wall depending on my position-view vector.
My problem:
When hitting a sharp corner in my polygon i cannot deside which way to slide, if the sphere is to close to the corner when i start sliding i end up to close to the wall. and when i slide and approach another wall i automatically start sliding against that wall.
when i start sliding i must be sure to slide out from the wall allthe way so the sphere is "free" at least >= 2.5f from the closest distance on that sliding wall.
The problem with sliding walls seems to never end.
The closest point on the polygon lines is working so now i need a good approach for solving sharp corners and when i start sliding i need to know how to slide clear out of the current "slide-wall".
help needed!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement