Jeysea
|
  |
| Joined: 13 Apr 2015 |
| Total Posts: 268 |
|
|
| 12 Sep 2015 10:46 AM |
| Is it possible to print out parts that a near one part? Say part1 is 13 studs away from part2, but 5 studs away from part3, could it print the closest part without iterating through every single part? |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 12 Sep 2015 10:49 AM |
Iterating to get the magnitudes and math.min.
Muad'Dib |
|
|
| Report Abuse |
|
|
Jeysea
|
  |
| Joined: 13 Apr 2015 |
| Total Posts: 268 |
|
|
| 12 Sep 2015 11:00 AM |
| Yeah, that's not the solution I want but I think it may be the only solution. There isn't any way to just center a search around a part? |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 11:01 AM |
If only Roblox let us script in C or something. Then it would be loads faster. (Almost wrote fatter on accident) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2015 11:10 AM |
| You want a Region3. Look it up in the Wiki. So find which Parts are in an area; then measure the distance of just those parts... |
|
|
| Report Abuse |
|
|
Jeysea
|
  |
| Joined: 13 Apr 2015 |
| Total Posts: 268 |
|
|
| 12 Sep 2015 11:37 AM |
http://wiki.roblox.com/index.php?title=API:Class/Workspace/FindPartsInRegion3
Excellent! |
|
|
| Report Abuse |
|
|