Jump to content

How to get the closest object on a specific z


Recommended Posts

Posted
33 minutes ago, pureleaf said:

How could the closet object be filtered to only return a object at a specific z plane, for example 0

Filter/lambda with closest method

closest(Filter<E>... filters)

Gets the closest generically specified Entity by using the Pythagoras algorithm.


I mean I guess if you wanted you could do it yourself with getAll() and then user the filter method from stream, then sort it by distance then get first other wise null

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...