Jump to content

How to check if Entity WILL be visible from specified position with specified camera angles?


darkxor

Recommended Posts

I want to make function with following signature:

boolean willBeVisible(Entity entity, int cameraX, int cameraY, int yew, int pitch)

or if camera finished moving to reflect player position change: boolean willBeVisible(Entity entity, Position playerPos, int yew, int pitch)

Any ideas where can i take Entity transform into camera space code snippet or how can use OSBot API to achieve this?

Link to comment
Share on other sites

Yeah, like this. But in addition - if player will be in different location.

42 minutes ago, Saiyan said:

Why would you want this? For what specific scenario? 

For example, to be able detect will be Entity visible after camera movement finish / bot finish walking to destination position or need continue moving towards Entity (do one more click on minimap/tile) so Entity become visible.

Link to comment
Share on other sites

On 4/26/2017 at 0:04 PM, darkxor said:

I want to make function with following signature:

boolean willBeVisible(Entity entity, int cameraX, int cameraY, int yew, int pitch)

or if camera finished moving to reflect player position change: boolean willBeVisible(Entity entity, Position playerPos, int yew, int pitch)

Any ideas where can i take Entity transform into camera space code snippet or how can use OSBot API to achieve this?

I've looked through the game client a while back and the issue always seems to be height. I did find something useful a while back that helped us with certain visibility checks, but models are a bit tricky. Try playing around with pitch, tile height, and model height.

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...