public class Camera extends API
Modifier and Type | Class and Description |
---|---|
static class |
Camera.CameraDirection
Represents the four camera key directions available.
|
bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
Camera() |
Modifier and Type | Method and Description |
---|---|
boolean |
canMiddleMouseControl()
Checks if the middle mouse button can be used to control the camera
|
int |
getLowestPitchAngle()
Gets the lowest available camera pitch angle value available at the current position and camera rotation.
|
int |
getPitchAngle()
Gets the current camera angle of pitch.
|
int |
getScaleZ()
Gets the curremt camera z scale
|
int |
getX()
Gets the client camera x coordinate in the camera coordinate space.
|
int |
getY()
Gets the client camera y coordinate in the camera coordinate space.
|
int |
getYawAngle()
Gets the current camera angle of rotation.
|
int |
getZ()
Gets the client camera z coordinate in the camera coordinate space.
|
void |
initializeModule() |
boolean |
isDefaultScaleZ() |
boolean |
moveCameraMouse(int yaw,
int pitch)
Moves the camera using the mouse for control
|
boolean |
movePitch(int degrees)
Rotates the pitch of the camera to the desired angle.
|
boolean |
moveYaw(int degrees)
Rotates the camera yaw to the specified angle.
|
boolean |
setMiddleMouseControl(boolean enabled)
A convenience method for
setMiddleMouseControl(boolean, boolean) with closeSettings provided as true |
boolean |
setMiddleMouseControl(boolean enabled,
boolean closeSettings)
Enables or disabled the use of the middle mouse button to control the camera
|
void |
setUseMouse(boolean useMouse)
Sets the default camera control to be middle mouse
|
boolean |
toBottom()
Rotates the camera pitch to the lowest angle possible.
|
boolean |
toEntity(Entity entity)
Moves the camera to the specified entity, stopping when the entity is within the gamescreen.
|
boolean |
toEntityMouse(Entity e)
Moves the camera to an entity using the mouse for control
|
boolean |
toEntityMouse(Position origin,
Entity e)
Moves the camera to an entity using the mouse for control
|
boolean |
toPosition(Position position)
Moves the camera to the specified position, stopping when the position is within the gamescreen.
|
boolean |
toPositionMouse(Position position)
Moves the camera to an entity using the mouse for control
|
boolean |
toPositionMouse(Position from,
Position to)
Moves the camera to a position using the mouse for control
|
boolean |
toTop()
Rotates the camera pitch to the highest angle possible.
|
exchangeContext, execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public void initializeModule()
initializeModule
in class API
public final boolean toEntity(Entity entity)
entity
- The entity to rotate to.public final boolean toPosition(Position position)
position
- The position to rotate to.public final boolean toTop()
public final boolean toBottom()
public final boolean moveYaw(int degrees)
Without middle mouse; this method returns instantly and moves the camera movement on a different thread.
degrees
- The angle to rotate the camera to.public boolean movePitch(int degrees)
Without middle mouse; This method returns instantly and moves the camera movement on a different thread.
degrees
- The angle to rotate the pitch to between 22 and 67. Note that 22 is not always
the lowest available pitch, based on the terrain the lowest available pitch
can be higher.public void setUseMouse(boolean useMouse)
useMouse
- True to use middle mouse, false to use keyboardpublic int getX()
public int getY()
public int getZ()
public int getLowestPitchAngle()
public int getYawAngle()
public int getScaleZ()
public boolean isDefaultScaleZ()
public int getPitchAngle()
public boolean canMiddleMouseControl()
public boolean setMiddleMouseControl(boolean enabled)
setMiddleMouseControl(boolean, boolean)
with closeSettings provided as truepublic boolean setMiddleMouseControl(boolean enabled, boolean closeSettings)
enabled
- True to enable the middle mouse button control, false to disable itcloseSettings
- True to close the settings panel after changing the settingpublic boolean toEntityMouse(Entity e)
e
- The entity to move the camera towardspublic boolean toEntityMouse(Position origin, Entity e)
origin
- The origin position to base the camera rotation one
- The entity to move the camera towardspublic boolean toPositionMouse(Position position)
position
- The position to move the camera towardspublic boolean toPositionMouse(Position from, Position to)
from
- The origin position to base the camera rotation onto
- The target position to move the camera towardspublic boolean moveCameraMouse(int yaw, int pitch)
yaw
- The yaw to move topitch
- The pich to move to