Class 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 Detail

      • ActorDestination

        public ActorDestination​(net.runelite.api.Actor actor)
    • Method Detail

      • getActor

        public net.runelite.api.Actor getActor()
      • shape

        public java.awt.Shape shape()
        Description copied from class: Destination
        The raw clickable outline in canvas pixels, or null when 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:
        shape in class Destination
      • describe

        public java.lang.String describe()
        Description copied from class: Destination
        A short label for logging and the overlay.
        Specified by:
        describe in class Destination
      • 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:
        cameraCanHelp in class Destination
      • focusPoint

        public net.runelite.api.coords.LocalPoint focusPoint()
        Description copied from class: Destination
        Where in the scene the camera should look to reveal this destination, or null when 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:
        focusPoint in class Destination