Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 21 Dec 2014 06:06 PM |
Basically I have a grid of square bricks and I want to find all adjacent bricks. However I don't want to find bricks that are diagonally adjacent. Wouldn't this filter through them? 12 is the correct distance.
if math.abs(v.Node.Position.X - currentCell.Node.Position.X) == 12 and math.abs(v.Node.Position.Z - currentCell.Node.Position.Z) == 12 and ((v.Node.Position.Z - currentCell.Node.Position.Z)-(v.Node.Position.X - currentCell.Node.Position.X)) ~= 0 then
|
|
|
| Report Abuse |
|