|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.InputAdapter
com.badlogic.gdx.graphics.g3d.utils.FirstPersonCameraController
public class FirstPersonCameraController
Takes a Camera
instance and controlls it via w,a,s,d and
mouse panning.
Constructor Summary | |
---|---|
FirstPersonCameraController(Camera camera)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class com.badlogic.gdx.InputAdapter |
---|
keyTyped, mouseMoved, scrolled, touchDown, touchUp |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FirstPersonCameraController(Camera camera)
Method Detail |
---|
public boolean keyDown(int keycode)
InputProcessor
keyDown
in interface InputProcessor
keyDown
in class InputAdapter
keycode
- one of the constants in Input.Keys
public boolean keyUp(int keycode)
InputProcessor
keyUp
in interface InputProcessor
keyUp
in class InputAdapter
keycode
- one of the constants in Input.Keys
public 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)
InputProcessor
touchDragged
in interface InputProcessor
touchDragged
in class InputAdapter
pointer
- the pointer for the event.
public void update()
public void update(float deltaTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |