|
| 01 Sep 2012 08:51 AM |
| Anyone know where to start when pathfinding using terrain? Kinda like crazyman32's pathfinding villager... |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2012 08:59 AM |
well it sort of depends. if you want to get a path from one point to another, use A* pathfinding. otherwise, Dijkstra's algorithm is the best. anyway, pathfinding on a flat plane is easiest. i would generate lots of points in an array, based on the part that your object is moving on, and implement pathfinding from there.
this is based on superficial research.
¬ SHG Scripter Tier-2, LuaLearners Elite - pm me! |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2012 04:16 PM |
| I have the A* program written, but how should I locate obstacles, using terrain methods? |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 01 Sep 2012 04:36 PM |
He didn't do any 3D math with that pathfinding villager in his videos. It's still 2D and he just used the :WorldToCellPreferEmpty method to get it.
http://wiki.roblox.com/index.php/WorldToCellPreferEmpty_(Method) |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2012 04:39 PM |
| I've been using solid, but it just uses the best path reversed from the obstacle locations? Wow, I never thought of that :/ |
|
|
| Report Abuse |
|
|