Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: westingtyler on February 09, 2017, 07:45:08 PM

Title: Find Closest. No? Then find NEXT Closest. Repeat. How?
Post by: westingtyler on February 09, 2017, 07:45:08 PM
How do we do this? There's not command for "next closest." How do we tell it to find the NEXT closest, after testing the closest object, and to continue doing this until it finds a suitable game object?
Title: Re: Find Closest. No? Then find NEXT Closest. Repeat. How?
Post by: ... on February 10, 2017, 12:23:19 AM
Add them to an array, run get distance on all of them, sort array, get item with index you want.

Here's a video that can help, courtesy of djaydino:
http://hutonggames.com/playmakerforum/index.php?topic=10906.0