From: Mikko Rasa Date: Mon, 1 Nov 2010 12:08:59 +0000 (+0000) Subject: Enforce a lower limit for camera distance X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=293bfd4d1a5dbd57c7d3c657e5f6467d9f2e3300;p=r2c2.git Enforce a lower limit for camera distance Adjust depth clip according to distance --- diff --git a/source/designer/cameracontroller.cpp b/source/designer/cameracontroller.cpp index bd7edbb..edebff7 100644 --- a/source/designer/cameracontroller.cpp +++ b/source/designer/cameracontroller.cpp @@ -83,7 +83,13 @@ void CameraController::adjust_distance(float delta) { const GL::Vector3 &pos = camera.get_position(); const GL::Vector3 &look = camera.get_look_direction(); + float dist = get_distance(); + float low = designer.get_layout().get_catalogue().get_gauge()*5; + if(dist+delta