sure np (: On Thu, Jun 17, 2010 at 11:18 AM, Kent Petersen <kentkmp@xxxxxxxxx> wrote: > Ok, I gotcha I'll have to check that out. Forgot we had a navmesh_getTile > that gets the x,y. Thanks > > > On Thu, Jun 17, 2010 at 9:25 AM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote: > >> Well you can use NavMesh_GetTile() to get the X,Y position of a specific >> navmesh tile so you can use that to tell the location of one tile in >> relation to another. >> >> Also i dont think you need to be able to get what tile a model is on to do >> the flag thing. You have the flag position (ie the position of the flag >> model once it's placed) and then all you need to do is find out which tile >> that has a road on it is closest to the flag and start building from there >> (: >> On Thu, Jun 17, 2010 at 8:06 AM, Kent Petersen <kentkmp@xxxxxxxxx>wrote: >> >>> I have been thinking about how I want to direct town growth. I think we >>> have all the tech I need to place a marker. Do we have the ability to >>> determine what navmesh tile a model is on? If not I will need that to. Once >>> we have the marker placed and the tile identified. I could compare it to my >>> last town growth tile and use the feedback to determine where to grow next >>> >>> I want to be able to detect the relative position of one navmesh tile to >>> another. I want to be able to select 2 tiles, FirstTile=0 SecondTile=25 Then >>> determine their relative postion of each other. This function could return 2 >>> values. Something like >>> >>> if SecondTile Yaxis > FirstTile Yaxis then return 1 >>> if SecondTile Yaxis < FirstTile Yaxis then return -1 >>> if SecondTile Yaxis == FirstTile Yaxis then return 0 >>> if SecondTile Xaxis > FirstTile Xaxis then return 1 >>> if SecondTile Xaxis < FirstTile Xaxis then return -1 >>> if SecondTile Xaxis == FirstTile Xaxis then return 0 >>> >>> 1) I could compare a tile of already built road (ie city you have) with >>> where you place the marker >>> 2) Let's say the function returns 1,1 >>> 3) I would then select a tile of road I already have and try to move 1 in >>> the X or 1 in the Y >>> 4) If the road already exists. goto 1 with new tiles for comparison >>> 5) If there is no road build a new one >>> >>> Let's say the first pass moves one to the Y. The next pass would then >>> return a function value of 1,0 and so the road would check 1 to the right >>> next. >>> >> >> >