diff options
Diffstat (limited to 'src/render/camera.cc')
-rw-r--r-- | src/render/camera.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/camera.cc b/src/render/camera.cc index 54c4547..913adfb 100644 --- a/src/render/camera.cc +++ b/src/render/camera.cc @@ -289,8 +289,8 @@ void Camera::frame(float seconds) } if (core::localcontrol()->model()) { - camera_target -= camera_axis.forward() * math::max(FRUSTUMFRONT / WORLDSCALE, core::localcontrol()->model()->maxbbox().x); - camera_target += camera_axis.up() * math::max(FRUSTUMFRONT / WORLDSCALE, core::localcontrol()->model()->maxbbox().z * 2.0f); + camera_target -= camera_axis.forward() * math::max(FRUSTUMFRONT / WORLDSCALE, core::localcontrol()->model()->maxbbox().x()); + camera_target += camera_axis.up() * math::max(FRUSTUMFRONT / WORLDSCALE, core::localcontrol()->model()->maxbbox().z() * 2.0f); } else { camera_target -= camera_axis.forward() * math::max (FRUSTUMFRONT / WORLDSCALE, FRUSTUMFRONT / WORLDSCALE + core::localcontrol()->radius()); camera_target += camera_axis.up() * math::max (FRUSTUMFRONT / WORLDSCALE, FRUSTUMFRONT / WORLDSCALE + core::localcontrol()->radius()); @@ -322,7 +322,7 @@ void Camera::frame(float seconds) camera_axis.assign(target_axis); if (core::localcontrol()->model()) { - camera_target += (core::localcontrol()->model()->maxbbox().x) * + camera_target += (core::localcontrol()->model()->maxbbox().x()) * core::localcontrol()->axis().forward(); } else { camera_target += (core::localcontrol()->radius()) * |