Sign in to follow this  
Meshboy

Edges Convex Polygon

Recommended Posts

Hello, i have read lots of tutorials on the internet, but i can´t find a good one that i fully understand. I am doing a FPS game and i am having a real hard time with the Collision Detection. I am only using 2D, just lines or polygons as bounderies. don´t even use planes, so the game is like Doom just 2D. I user a Sphere against any polygon wall or just linesegments and can easily determine how for away the sphere is by projecting. i can also use raycast and see where the view vector intersects. Corners are no problems, just count nr of hits, when 2 you are in a corner. (check angle and so on) The MAIN problem is edges, convex edges, i need to check that the sphere is free from BOTH walls of the edge before sending the spehere sliding at any direction. I have also tried the closest point on the polygon but the problem with edges also appears there. its hard when using normal length to setup a max_distance from wall, on the edges there becomes "hole" in the middle of the convex edges. I don´t need links to tutorials, ihave seen them all (i think =)) i Need a Plan, how do you solve sliding a sphere around an edge in 2d? need help.

Share this post


Link to post
Share on other sites
Ok, is this your problem:

Let's say you have a wall corner. And you are trying to 'slide' a circle around the corner.

Let's say that you do a good job of keeping the Circle vertexes out of the wall, but the corner of the wall slides into the circle between two of the Circle Vertexes.

Is that your problem?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this