Thread: findPath()
View Single Post
  #7  
Old 10-20-2009, 11:16 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
I edited your script so that use takes an offset x/y and width/height for wall checking.

The function parameters now goes as this:
findPath(cx, cy, offSet, blockSize, tx, ty, cutCorners, fullPath)

Where offSet and blockSize are two-member arrays.

It's not perfect, but it does work pretty well.
Attached Files
File Type: txt findpath-revised.txt (9.7 KB, 278 views)
Reply With Quote