source: trunk/luaui/widgets/camera_smoothcam.lua @ 5877

Revision 3808, 1.1 KB checked in by Floris, 4 years ago (diff)

Smooth camera: camSpeed form 0.33 to 0.27

Line 
1local versionNumber = "0.5"
2
3function widget:GetInfo()
4  return {
5    name      = "SmoothCam",
6    desc      = "[v" .. string.format("%s", versionNumber ) .. "] Moves camera smoothly",
7    author    = "very_bad_soldier",
8    date      = "August, 8, 2010",
9    license   = "GNU GPL, v2 or later",
10    layer     = 0,
11        handler   = true,
12    enabled   = true
13  }
14end
15
16
17--------------------------------------------------------------------------------
18----------------------------Configuration---------------------------------------
19local camSpeed   = 0.27
20--------------------------------------------------------------------------------
21--------------------------------------------------------------------------------
22local spGetCameraState          = Spring.GetCameraState
23local spSetCameraState          = Spring.SetCameraState
24--------------------------------------------------------------------------------
25--------------------------------------------------------------------------------
26function widget:Update(dt)
27  local cs = spGetCameraState()
28  spSetCameraState(cs, camSpeed)
29end
30
Note: See TracBrowser for help on using the repository browser.