public class FirstPersonCameraController extends InputAdapter
Camera instance and controls it via w,a,s,d and mouse panning.| Constructor and Description |
|---|
FirstPersonCameraController(Camera camera) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
keyDown(int keycode)
Called when a key was pressed
|
boolean |
keyUp(int keycode)
Called when a key was released
|
void |
setDegreesPerPixel(float degreesPerPixel)
Sets how many degrees to rotate per pixel the mouse moved.
|
void |
setVelocity(float velocity)
Sets the velocity in units per second for moving forward, backward and strafing left/right.
|
boolean |
touchDragged(int screenX,
int screenY,
int pointer)
Called when a finger or the mouse was dragged.
|
void |
update() |
void |
update(float deltaTime) |
keyTyped, mouseMoved, scrolled, touchDown, touchUppublic FirstPersonCameraController(Camera camera)
public boolean keyDown(int keycode)
InputProcessorkeyDown in interface InputProcessorkeyDown in class InputAdapterkeycode - one of the constants in Input.Keyspublic boolean keyUp(int keycode)
InputProcessorkeyUp in interface InputProcessorkeyUp in class InputAdapterkeycode - one of the constants in Input.Keyspublic void setVelocity(float velocity)
velocity - the velocity in units per secondpublic void setDegreesPerPixel(float degreesPerPixel)
degreesPerPixel - public boolean touchDragged(int screenX,
int screenY,
int pointer)
InputProcessortouchDragged in interface InputProcessortouchDragged in class InputAdapterpointer - the pointer for the event.public void update()
public void update(float deltaTime)