Package net.openosrs.api.input.target
Class ActorDestination
- java.lang.Object
-
- net.openosrs.api.input.target.Destination
-
- net.openosrs.api.input.target.ActorDestination
-
public class ActorDestination extends Destination
An NPC or player, aimed at through its model hull.The hull is re-read every call because actors move. A destination captured at plan time and reused would send the cursor to where the target stood a second ago, which is both ineffective and conspicuous.
-
-
Constructor Summary
Constructors Constructor Description ActorDestination(net.runelite.api.Actor actor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancameraCanHelp()An actor that has despawned is gone for good; no amount of camera work brings it back, and the caller needs to re-resolve its target.java.lang.Stringdescribe()A short label for logging and the overlay.net.runelite.api.coords.LocalPointfocusPoint()Where in the scene the camera should look to reveal this destination, ornullwhen the concept does not apply.net.runelite.api.ActorgetActor()java.awt.Shapeshape()The raw clickable outline in canvas pixels, ornullwhen the target has no projection at all.-
Methods inherited from class net.openosrs.api.input.target.Destination
area, bounds, centre, contains, getViewport, isCurrent, isVisible, needsCamera, needsScroll, scrollContainer, scrollDirection, suitablePoint, toString, visibleShape, withValidity, withViewport
-
-
-
-
Method Detail
-
getActor
public net.runelite.api.Actor getActor()
-
shape
public java.awt.Shape shape()
Description copied from class:DestinationThe raw clickable outline in canvas pixels, ornullwhen the target has no projection at all.This is unclipped on purpose. The client projects actors and objects that are behind or beside the camera to coordinates far outside the canvas rather than returning null, so a non-null shape here is not a claim that anything is on screen. Use
Destination.visibleShape()for that.- Specified by:
shapein classDestination
-
describe
public java.lang.String describe()
Description copied from class:DestinationA short label for logging and the overlay.- Specified by:
describein classDestination
-
cameraCanHelp
public boolean cameraCanHelp()
An actor that has despawned is gone for good; no amount of camera work brings it back, and the caller needs to re-resolve its target.- Overrides:
cameraCanHelpin classDestination
-
focusPoint
public net.runelite.api.coords.LocalPoint focusPoint()
Description copied from class:DestinationWhere in the scene the camera should look to reveal this destination, ornullwhen the concept does not apply.Screen furniture has no scene position, so it returns null and the camera is left alone. World targets return their location and the camera controller works out the rotation from there.
- Overrides:
focusPointin classDestination
-
-