Answers for "Get Vector3s in range"
http://answers.unity.com/questions/1233126/get-vector3s-in-range.html
The latest answers for the question "Get Vector3s in range"Answer by tanoshimi
http://answers.unity.com/answers/1233156/view.html
If your candidate vectors are in a simple array, there's really only one approach:
- loop through the array
- calculate the vector difference between each item in the array and your "target" vector3 (V = Vectorâ‚“ - Vectorâ‚€ )
- calculate the squared magnitude of the difference (V.sqrMagnitude)
- if this exceeds the square of your "range", discard the candidate, otherwise keep it
- move on to the next item in the arrayMon, 22 Aug 2016 17:56:50 GMTtanoshimi