Class ObjectDestination


  • public class ObjectDestination
    extends Destination
    A scene object, aimed at through its click box.

    Click boxes are generous compared to model hulls, so aim is deliberately left to the inherited normal distribution rather than clamped further: a person clicking a bank booth does not hit the same pixel of it twice.

    • Constructor Detail

      • ObjectDestination

        public ObjectDestination​(net.runelite.api.TileObject object,
                                 java.lang.String label)
    • Method Detail

      • getObject

        public net.runelite.api.TileObject getObject()
      • 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
      • 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