Documentation

Classes

Class AnimatorCameraFPS

Special scene node animator for first person shooter cameras.

Extends Animator.

Class Overview
AnimatorCameraFPS(cam, engine)
Special scene node animator for first person shooter cameras. This scene node animator can be attached to a CameraSceneNode to make it act like a first person shooter. By pressing the cursor keys or WASD, the camera will move and by having the mouse button pressed while moving, the camera will look around.
Parameters:
cam
an instance of a CameraSceneNode this animator will be attached to. Can be null if the camera is not yet known.
engine
An instance of the CopperLicht 3d engine, for receiving the mouse and keyboard input.

Field Summary
Field Attributes Field Name and Description
 
Maximal jump speed the user is able to jump with this camera.
 
Maximal vertical angle the user is able to look.
 
Defines if the animator may move the camera
 
Defines if the animator may zoom the camera
 
Maximal movment speed of the camera.
 
Defines if the animator may only move the camera horizontally
 
Maximal rotation speed the user is able to look.
Method Summary
Method Attributes Method Name and Description
 
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
 
Returns the type of the animator.
 
lookAt(target)
Lets the camera look at the specified point.
 
Methods borrowed from class Animator:
onKeyDown, onKeyUp, onMouseDown, onMouseMove, onMouseUp, onMouseWheel
Field Detail
{Number} JumpSpeed
Maximal jump speed the user is able to jump with this camera.
Default Value:
0

{Number} MaxVerticalAngle
Maximal vertical angle the user is able to look.
Default Value:
88

{Boolean} MayMove
Defines if the animator may move the camera
Default Value:
true

{Boolean} MayZoom
Defines if the animator may zoom the camera
Default Value:
true

{Number} MoveSpeed
Maximal movment speed of the camera.
Default Value:
0.06

{Boolean} NoVerticalMovement
Defines if the animator may only move the camera horizontally
Default Value:
false

{Number} RotateSpeed
Maximal rotation speed the user is able to look.
Default Value:
200.0
Method Detail
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
Parameters:
n
The Scene node which needs to be animated this frame.
timeMs
The time in milliseconds since the start of the scene.

getType()
Returns the type of the animator. For the AnimatorCameraFPS, this will return 'camerafps'.

lookAt(target)
Lets the camera look at the specified point.
Parameters:
target
target 3d position of type Vect3d.

setMayMove(b)
Parameters:
b

© 2010 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit