Jump to content

How to get the closest object on a specific z


pureleaf

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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