|
| 23 Feb 2015 12:20 AM |
| I've been working with a pathdfinding system. And I'm not sure, but from what I remember my system was working fine a few months ago. It basically uses the pathfinding to get a humanoid to move to the closest humanoid in the workspace. But somewhat recently I noticed the system doesn't work very well. The humanoid would get stuck on walls and not navigate around them. So I went into testing and I found that, pathfinding only works if a bricks depth is more than 1 stud. Otherwise it almost doesn't register the wall as being there. Is there a reason for this? |
|
|
| Report Abuse |
|
|
ThaneDev
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 1600 |
|
|
| 23 Feb 2015 12:37 AM |
| Yes, it's because it checks for the path to have a clear area of 4x4x4 block to walk through it, if you create using the Roblox terrain, it'll work perfectly. |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 01:11 AM |
I can't use ROBLOX terrain. I have buildings that are less than those dimensions. Is there no way to fix this?
|
|
|
| Report Abuse |
|
|
ThaneDev
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 1600 |
|
|
| 23 Feb 2015 01:14 AM |
| You can measure the places you want them to walk using roblox terrain. |
|
|
| Report Abuse |
|
|
ThaneDev
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 1600 |
|
| |
|
|
| 23 Feb 2015 01:56 AM |
What do you mean measure the places I need them to walk? They follow a humanoid. And are supposed to walk around bricks that get in there way to get to that humanoid. |
|
|
| Report Abuse |
|
|
seanb117
|
  |
| Joined: 03 Feb 2010 |
| Total Posts: 1020 |
|
|
| 23 Feb 2015 05:25 AM |
According to http://wiki.roblox.com/index.php?title=Pathfinding , there is a way you can fix this. You can.... 1. Make the parts thicker. 2. Lower the "EmptyCutoff" value of the PathfindingService.
|
|
|
| Report Abuse |
|
|
doomcrow5
|
  |
| Joined: 27 Apr 2008 |
| Total Posts: 31 |
|
|
| 23 Feb 2015 09:16 AM |
Just lower the EmptyCutOff
EmptyCutoff Value Type: float Description: When the PathfindingService computes a path it uses the voxel representation of the world. A voxel is one cube in a grid overlayed on the world. In this case the voxels being used are 4x4x4. This property sets the percent of a voxel has to be occupied to be considered empty. Defaults to 0.16.
Set it to around .01
Might be too little but at least try that.
|
|
|
| Report Abuse |
|
|
|
| 23 Feb 2015 06:04 PM |
| How do I lower the emptycutoff? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 24 Feb 2015 02:30 PM |
game:GetService("PathfindingService").EmptyCutoff = 0.01
or whatever you want it at |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2015 03:00 PM |
You are still going to have thicken your walls, if they r very thin, and line-up all the edges of walls with the 4x4 grid: The easiest way to do this is to build with Terrai first; then replace all of the Terrain with parts, without "Coloring-outside-of-the-lines".
|
|
|
| Report Abuse |
|
|
|
| 24 Feb 2015 03:08 PM |
| Also u should make the shoulders of the AI non-colidable, but REALLY you should check the Error Status of you PathFind call, and do something else if in Error, as well as have a dead-mans cluch in the code to abandon the Path-Follw, if he is ever hung-up somewhere, |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2015 04:08 PM |
| Bj I really don't understand why I should use terrain for this? I don't use it, but doesn't it have to be generated? And what if the map is higher then the max terrain x/y/z levels? |
|
|
| Report Abuse |
|
|
ThaneDev
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 1600 |
|
|
| 24 Feb 2015 06:12 PM |
| You have to use terrain to measure the spaces it walks because it measures gaps in Voxels (4x4x4) blocks. And terrain cells are that size and in the correct positions. You can place terrain by clicking on Terrain > Builder. |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2015 06:20 PM |
I still don't understand?
Why would I place down terrain. I don't want terrain in the map. I'm using parts. Measure what, the humanoid finds the nearest torso. It's going to be walking wherever it's placed to the torso. |
|
|
| Report Abuse |
|
|
ThaneDev
|
  |
| Joined: 08 Apr 2009 |
| Total Posts: 1600 |
|
|
| 24 Feb 2015 06:29 PM |
| The humanoid will search 4x4x4 areas to check if their clear to walk through that area, terrain is 4x4x4, place terrain to measure the clear areas and then delete the terrain. |
|
|
| Report Abuse |
|
|
|
| 24 Feb 2015 08:08 PM |
Why measure it?
I really don't get why I place terrain and then delete it?
I can't even explain my self I don't get why I need to put terrain down. Either way I got the system to work. |
|
|
| Report Abuse |
|
|