• Create Account

### #ActualTannerd

Posted 14 July 2012 - 01:36 AM

I guess you will need to.
Actually I think ( I am not 100% sure ) you should cast a circle (or a box) which is slightly more complicated. What you do in this case however, is enlarge the walls by the agent radius obtaining a sort of rounded walls (the corners of the inflated walls will be filled with arcs), and then cast a ray against them; the ray shall have length = distance_of_wall_detection (which could be current_velocity * time_of_prediction). You will need segment to segment intersections and segment to circle intersection
( http://www.gamedev.n...e-intersection/ )
By the way, (I am saying this just not to let anything out) do you connect the node of the graph based only on the criterion that two adjacent cells are passable?
If yes you should instead cast a box as large as a gridcell (or as large as an agent bounding box) towards an adjacent cell and connect them only if no intersection with any static obstacle occurred. In this way the smoothed path you showed might not be computed: the agent will go up to the cell with the value = 2 and the steer by 90° towards the goal.
I hope this helps.

### #1Tannerd

Posted 13 July 2012 - 01:08 AM

I guess you will need to.
Actually I think ( I am not 100% sure ) you should cast a circle (or a box) which is slightly more complicated. What you do in this case however, is enlarge the walls by the agent radius obtaining a sort of rounded walls (the corners of the inflated walls will be filled with arcs), and then cast a ray against them; the ray shall have length = distance_of_wall_detection (which could be current_velocity * time_of_prediction). You will need segment to segment intersections and segment to circle intersection
( http://www.gamedev.net/topic/304578-finite-line-circle-intersection/ )
By the way, (I am saying this just not to let anything out) do you connect the node of the graph based only on the criterion that two adjacent cells are passable?
If yes you should instead cast a box as large as a gridcell towards an adjacent cell and connect them only if no intersection with any static obstacle occurred. In this way the smoothed path you showed might not be computed: the agent will go up to the cell with the value = 2 and the steer by 90° towards the goal.
I hope this helps.

PARTNERS