Home

Module camera

Lua bindings to interact with the Camera. An example would be:
 

Functions

camera.set (target, soft_over, speed) Sets the camera.


Functions

camera.set (target, soft_over, speed)
Sets the camera. Make sure to reset camera after using it or we'll run into trouble.

Parameters

  • target: Should be either a vec2 or a pilot to focus on. It will follow pilots around. If nil, it follows the player.
  • soft_over: Defaults to false, indicates if the camera should fly over or instantly teleport.
  • speed: Speed at which to fly over. Defaults to 2500 if omitted and soft_over is true.

Usage

  • camera.set() -- Resets the camera to the pilot hard.
  • camera.set( a_pilot, true ) -- Flies camera over to a_pilot.
  • camera.set( vec2.new() ) -- Jumps camera to 0,0

Valid XHTML 1.0!