## Documentation

- Overview
- Website
- Tutorials
- Class Index

## Classes

- _global_
- CL3D
- CL3D.AnimatedMeshSceneNode
- CL3D.Animator
- CL3D.AnimatorAnimateTexture
- CL3D.AnimatorCameraFPS
- CL3D.AnimatorCameraModelViewer
- CL3D.AnimatorCollisionResponse
- CL3D.AnimatorFlyCircle
- CL3D.AnimatorFlyStraight
- CL3D.AnimatorFollowPath
- CL3D.AnimatorOnClick
- CL3D.AnimatorOnProximity
- CL3D.AnimatorRotation
- CL3D.BillboardSceneNode
- CL3D.BoundingBoxTriangleSelector
- CL3D.Box3d
- CL3D.CameraSceneNode
- CL3D.ColorF
- CL3D.CopperCubeVariable
- CL3D.CopperLicht
- CL3D.CubeSceneNode
- CL3D.HotspotSceneNode
- CL3D.Light
- CL3D.LightSceneNode
- CL3D.Line3d
- CL3D.Material
- CL3D.Matrix4
- CL3D.Mesh
- CL3D.MeshBuffer
- CL3D.MeshSceneNode
- CL3D.MeshTriangleSelector
- CL3D.MetaTriangleSelector
- CL3D.Mobile2DInputSceneNode
- CL3D.OctTreeTriangleSelector
- CL3D.Overlay2DSceneNode
- CL3D.ParticleSystemSceneNode
- CL3D.PathSceneNode
- CL3D.Plane3d
- CL3D.Quaternion
- CL3D.Renderer
- CL3D.Scene
- CL3D.SceneNode
- CL3D.SkyBoxSceneNode
- CL3D.SoundSceneNode
- CL3D.TerrainSceneNode
- CL3D.Texture
- CL3D.TextureManager
- CL3D.Triangle3d
- CL3D.TriangleSelector
- CL3D.Vect2d
- CL3D.Vect3d
- CL3D.Vertex3D
- CL3D.WaterSurfaceSceneNode

CopperLicht API Documentation

# Class CL3D.AnimatorCameraFPS

Special scene node animator for first person shooter cameras.
Extends CL3D.Animator.

Class Overview
CL3D.AnimatorCameraFPS(cam, engine)
Special scene node animator for first person shooter cameras. This scene node animator can be attached to a CL3D.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:
{CL3D.CameraSceneNode} cam
  an instance of a CL3D.CameraSceneNode this animator will be attached to. Can be null if the camera is not yet known.
{CL3D.CopperLicht} engine
  An instance of the CopperLicht 3d engine, for receiving the mouse and keyboard input.

Field Summary
Field Attributes | Field Name and Description
--- | ---
| JumpSpeed Maximal jump speed the user is able to jump with this camera.
| MaxVerticalAngle Maximal vertical angle the user is able to look.
| MayMove Defines if the animator may move the camera
| MayZoom Defines if the animator may zoom the camera
| MoveSpeed Maximal movment speed of the camera.
| NoVerticalMovement Defines if the animator may only move the camera horizontally
| RotateSpeed 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.
| getType() Returns the type of the animator.
| lookAt(target) Lets the camera look at the specified point.
| setLookByMouseDown(b) Sets if the camera look direction is moved by the cursor when the mouse is down or not
| setMayMove(b) Sets if the animator may move the camera

Methods borrowed from class CL3D.Animator:
  createClone, 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:
{CL3D.SceneNode} n
  The Scene node which needs to be animated this frame.
{Integer} 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.

{Boolean} setLookByMouseDown(b)
Sets if the camera look direction is moved by the cursor when the mouse is down or not

Parameters:
b

{Boolean} setMayMove(b)
Sets if the animator may move the camera

Parameters:
b

© 2011-2018 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit