Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-01 12:41:31 +0000
committerStijn Buys <ingar@osirion.org>2008-05-01 12:41:31 +0000
commitf5266b403c50cb2b6d712e6d8f41b62ad2433efb (patch)
treefbd1cbafbb6d43b2fd5838cff8ce85df245bac86 /src/client
parente2b18c44a6ae38bb84f717c86988a80da137c3e7 (diff)
lights
Diffstat (limited to 'src/client')
-rw-r--r--src/client/camera.cc4
-rw-r--r--src/client/camera.h3
-rw-r--r--src/client/view.cc2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/client/camera.cc b/src/client/camera.cc
index d264ddf..e2dbacf 100644
--- a/src/client/camera.cc
+++ b/src/client/camera.cc
@@ -25,6 +25,7 @@ namespace camera
// gameworld coordinates of the camera target
math::Vector3f target;
math::Vector3f eye;
+math::Axis axis;
// target yaw, angle in XZ plane, positive is looking left
float yaw_target;
@@ -130,7 +131,6 @@ void next_mode()
void draw(float elapsed)
{
math::Matrix4f matrix;
- math::Axis axis;
float d = 0;
@@ -158,7 +158,7 @@ void draw(float elapsed)
if (mode == Track) {
// make the camera swing while turning
- yaw_target = 25 * core::localcontrol()->target_direction;
+ yaw_target = -25.0f * core::localcontrol()->target_direction;
pitch_target = pitch_track - 25 * core::localcontrol()->target_pitch;
}
diff --git a/src/client/camera.h b/src/client/camera.h
index 2a79fda..25e179d 100644
--- a/src/client/camera.h
+++ b/src/client/camera.h
@@ -47,6 +47,9 @@ namespace camera
/// gameworld coordinates of the camera eye
extern math::Vector3f eye;
+ /// global camera axis coordinate system
+ extern math::Axis axis;
+
/// current camera mode
extern Mode mode;
diff --git a/src/client/view.cc b/src/client/view.cc
index 39cd351..6f5ceca 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -268,7 +268,7 @@ void frame(float seconds)
camera::draw(seconds); // draw the current camera transformation
- render::draw(camera::eye, camera::target, seconds); // draw the world
+ render::draw(camera::axis, camera::eye, camera::target, seconds); // draw the world
}