CameraAPI
Camera API for programmatic camera control.
ClassRLPlugins API
public class CameraAPIConstants
MAX_ZOOM_SCALE, PITCH_MAX, PITCH_MIN, YAW_MAX, YAW_MIN
Members
Static methods
- intdegreesToUnits(double)
Converts degrees to JAU14 camera units.
- voidfaceEast()
Sets the camera to face east.
- voidfaceNorth()
Sets the camera to face north.
- voidfaceSouth()
Sets the camera to face south.
- voidfaceWest()
Sets the camera to face west.
- StringgetCompassDirection()
Gets the compass direction the camera is facing.
- intgetMaxZoomScale()
Gets the zoom scale treated as fully zoomed in by VitaLite camera logic.
- intgetPitch()
Gets the current camera pitch (vertical tilt).
- doublegetPitchDegrees()
Gets the current camera pitch in degrees.
- intgetPitchDifference()
Gets the angle difference between current pitch and target.
- intgetPitchTarget()
Gets the target camera pitch based on player input.
- intgetYaw()
Gets the current camera yaw (horizontal rotation).
- doublegetYawDegrees()
Gets the current camera yaw in degrees.
- intgetYawDifference()
Gets the angle difference between current yaw and target.
- intgetYawTarget()
Gets the target camera yaw based on player input.
- intgetZoomScale()
Gets the current RuneLite camera zoom scale.
- booleanisMoving()
Checks if the camera is currently moving/interpolating.
- voidlookAt(WorldPoint)
Points the camera toward a specific world point.
- voidlookAt(WorldPoint, int)
Points the camera toward a specific world point with given pitch.
- voidreset()
Resets the camera to default position (north-facing, medium pitch).
- voidrotatePitch(int)
Rotates the camera pitch (vertical) by a relative amount.
- voidrotatePitchDegrees(double)
Rotates the camera pitch by degrees.
- voidrotateYaw(int)
Rotates the camera yaw (horizontal) by a relative amount.
- voidrotateYawDegrees(double)
Rotates the camera yaw by degrees.
- voidsetPitchTarget(int)
Sets the target camera pitch (vertical tilt) The camera will smoothly interpolate to this target.
- voidsetPitchTargetDegrees(double)
Sets the camera pitch target in degrees.
- voidsetSpeed(float)
Sets the camera interpolation speed.
- voidsetYawTarget(int)
Sets the target camera yaw (horizontal rotation) The camera will smoothly interpolate to this target.
- voidsetYawTargetDegrees(double)
Sets the camera yaw target in degrees.
- voidtiltDown()
Tilts the camera down by the default speed.
- voidtiltDown(int)
Tilts the camera down by a specific amount.
- voidtiltUp()
Tilts the camera up by the default speed.
- voidtiltUp(int)
Tilts the camera up by a specific amount.
- voidturnLeft()
Turns the camera left by the default speed.
- voidturnLeft(int)
Turns the camera left by a specific amount.
- voidturnRight()
Turns the camera right by the default speed.
- voidturnRight(int)
Turns the camera right by a specific amount.
- doubleunitsToDegrees(int)
Converts JAU14 camera units to degrees.
degreesToUnits(double)static
public static int degreesToUnits(double degrees)Converts degrees to JAU14 camera units.
Parameters
degrees- Angle in degrees.
Returns
Angle in JAU14 units.
faceEast()static
public static void faceEast()Sets the camera to face east.
faceNorth()static
public static void faceNorth()Sets the camera to face north.
faceSouth()static
public static void faceSouth()Sets the camera to face south.
faceWest()static
public static void faceWest()Sets the camera to face west.
getCompassDirection()static
public static String getCompassDirection()Gets the compass direction the camera is facing.
Returns
Cardinal direction as a string (N, NE, E, SE, S, SW, W, NW).
getMaxZoomScale()static
public static int getMaxZoomScale()Gets the zoom scale treated as fully zoomed in by VitaLite camera logic.
Returns
Max zoom-in scale.
getPitch()static
public static int getPitch()Gets the current camera pitch (vertical tilt).
Returns
Camera pitch in JAU14 units (normally 1024-3064).
getPitchDegrees()static
public static double getPitchDegrees()Gets the current camera pitch in degrees.
Returns
Camera pitch in degrees.
getPitchDifference()static
public static int getPitchDifference()Gets the angle difference between current pitch and target.
Returns
Angle difference in units.
getPitchTarget()static
public static int getPitchTarget()Gets the target camera pitch based on player input.
Returns
Target camera pitch in JAU14 units (normally 1024-3064).
getYaw()static
public static int getYaw()Gets the current camera yaw (horizontal rotation).
Returns
Camera yaw in JAU14 units (0-16383).
getYawDegrees()static
public static double getYawDegrees()Gets the current camera yaw in degrees.
Returns
Camera yaw in degrees (0-360).
getYawDifference()static
public static int getYawDifference()Gets the angle difference between current yaw and target.
Returns
Angle difference in JAU14 units (0-8192).
getYawTarget()static
public static int getYawTarget()Gets the target camera yaw based on player input.
Returns
Target camera yaw in JAU14 units (0-16383).
getZoomScale()static
public static int getZoomScale()Gets the current RuneLite camera zoom scale.
Returns
Camera zoom scale.
isMoving()static
public static boolean isMoving()Checks if the camera is currently moving/interpolating.
Returns
True if camera is moving toward target, false if at target.
lookAt(WorldPoint)static
public static void lookAt(WorldPoint target)Points the camera toward a specific world point.
Parameters
target- The world point to look at.
lookAt(WorldPoint, int)static
public static void lookAt(WorldPoint target, int pitch)Points the camera toward a specific world point with given pitch.
Parameters
target- The world point to look at.
pitch- The pitch angle in JAU14 units (normally 1024-3064).
reset()static
public static void reset()Resets the camera to default position (north-facing, medium pitch).
rotatePitch(int)static
public static void rotatePitch(int deltaUnits)Rotates the camera pitch (vertical) by a relative amount.
Parameters
deltaUnits- Amount to rotate in JAU14 units (positive = down).
rotatePitchDegrees(double)static
public static void rotatePitchDegrees(double deltaDegrees)Rotates the camera pitch by degrees.
Parameters
deltaDegrees- Amount to rotate in degrees (positive = down).
rotateYaw(int)static
public static void rotateYaw(int deltaUnits)Rotates the camera yaw (horizontal) by a relative amount.
Parameters
deltaUnits- Amount to rotate in JAU14 units (positive = clockwise).
rotateYawDegrees(double)static
public static void rotateYawDegrees(double deltaDegrees)Rotates the camera yaw by degrees.
Parameters
deltaDegrees- Amount to rotate in degrees (positive = clockwise).
setPitchTarget(int)static
public static void setPitchTarget(int pitch)Sets the target camera pitch (vertical tilt) The camera will smoothly interpolate to this target.
Parameters
pitch- Target pitch in JAU14 units (normally 1024-3064), clamped to valid range.
setPitchTargetDegrees(double)static
public static void setPitchTargetDegrees(double degrees)Sets the camera pitch target in degrees.
Parameters
degrees- Target pitch in degrees.
setSpeed(float)static
public static void setSpeed(float speed)Sets the camera interpolation speed.
Parameters
speed- Speed multiplier (1.0 = normal, higher = faster interpolation).
setYawTarget(int)static
public static void setYawTarget(int yaw)Sets the target camera yaw (horizontal rotation) The camera will smoothly interpolate to this target.
Parameters
yaw- Target yaw in JAU14 units (0-16383), wrapped to valid range.
setYawTargetDegrees(double)static
public static void setYawTargetDegrees(double degrees)Sets the camera yaw target in degrees.
Parameters
degrees- Target yaw in degrees.
tiltDown()static
public static void tiltDown()Tilts the camera down by the default speed.
tiltDown(int)static
public static void tiltDown(int units)Tilts the camera down by a specific amount.
Parameters
units- Amount to tilt in JAU14 units.
tiltUp()static
public static void tiltUp()Tilts the camera up by the default speed.
tiltUp(int)static
public static void tiltUp(int units)Tilts the camera up by a specific amount.
Parameters
units- Amount to tilt in JAU14 units.
turnLeft()static
public static void turnLeft()Turns the camera left by the default speed.
turnLeft(int)static
public static void turnLeft(int units)Turns the camera left by a specific amount.
Parameters
units- Amount to turn in JAU14 units.
turnRight()static
public static void turnRight()Turns the camera right by the default speed.
turnRight(int)static
public static void turnRight(int units)Turns the camera right by a specific amount.
Parameters
units- Amount to turn in JAU14 units.
unitsToDegrees(int)static
public static double unitsToDegrees(int units)Converts JAU14 camera units to degrees.
Parameters
units- Angle in JAU14 units.
Returns
Angle in degrees.
Also allowed
Every class has these, as in plain Java.
equals, toString