Tag Info

New answers tagged

2

Something like the following algorithm: getNearest(Vector3f position) { distance = MAX_VALUE tmpDistance = MAX_VALUE nearestObject = null foreach objectInArray //for each object in your array //get the distance from that object to the position you're interested in tmpDistance = getDistance(currentObject, position) if ...



Top 50 recent answers are included