darkxor Posted April 26, 2017 Share Posted April 26, 2017 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? Quote Link to comment Share on other sites More sharing options...
Saiyan Posted April 26, 2017 Share Posted April 26, 2017 Why would you want this? For what specific scenario? Quote Link to comment Share on other sites More sharing options...
Pseudo Posted April 26, 2017 Share Posted April 26, 2017 I'm struggling to understand what you're asking; Do you mean you want to check if the entity is visible when the camera is at a certain yaw/pitch/angle, in relativity to the player? Quote Link to comment Share on other sites More sharing options...
darkxor Posted April 26, 2017 Author Share Posted April 26, 2017 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. Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted April 26, 2017 Share Posted April 26, 2017 I don't script but wouldn't something like isClickable() work? and isn't something like that on the API? Quote Link to comment Share on other sites More sharing options...
Alek Posted April 28, 2017 Share Posted April 28, 2017 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. Quote Link to comment Share on other sites More sharing options...