diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/camera.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/render/camera.cc b/src/render/camera.cc index a879b82..7f1f307 100644 --- a/src/render/camera.cc +++ b/src/render/camera.cc @@ -181,7 +181,7 @@ void Camera::draw(float seconds) camera_target.assign(core::localcontrol()->location()); target_axis.assign(core::localcontrol()->axis()); } - + if (core::localcontrol()->model()) { distance = core::localcontrol()->model()->radius(); } else { @@ -193,7 +193,7 @@ void Camera::draw(float seconds) float angle; float side; float u; - const float cam_speed = seconds; + //const float camspeed = 90.0f * seconds; // 180 degrees per second math::Vector3f n; math::Vector3f p; @@ -215,7 +215,7 @@ void Camera::draw(float seconds) cosangle = math::dotproduct(p, camera_axis.up()); if (fabs(cosangle) + MIN_DELTA < 1 ) { angle = acos(cosangle) * 180.0f / M_PI; - angle = math::sgnf(side) * angle * cam_speed; + angle = math::sgnf(side) * angle * seconds; camera_axis.change_pitch(-angle); } } @@ -237,7 +237,7 @@ void Camera::draw(float seconds) cosangle = math::dotproduct(p, camera_axis.forward()); if (fabs(cosangle) + MIN_DELTA < 1 ) { angle = acos(cosangle) * 180.0f / M_PI; - angle = math::sgnf(side) * angle * cam_speed; + angle = math::sgnf(side) * angle * seconds; camera_axis.change_direction(angle); } } @@ -259,16 +259,16 @@ void Camera::draw(float seconds) cosangle = math::dotproduct(p, camera_axis.up()); if (fabs(cosangle) + MIN_DELTA < 1 ) { angle = acos(cosangle) * 180.0f / M_PI; - angle = math::sgnf(side) * angle * cam_speed; + angle = math::sgnf(side) * angle * seconds; camera_axis.change_roll(angle); } } - if (core::localcontrol()->model()) { +/* if (core::localcontrol()->model()) { camera_target -= (core::localcontrol()->model()->maxbbox().x + 0.1f) * camera_axis.forward(); camera_target += (core::localcontrol()->model()->maxbbox().z + 0.1f ) * camera_axis.up(); } - +*/ } else if (mode() == Free) { camera_axis.assign(target_axis); |