const GL::Vector3 &pos = camera.get_position();
const GL::Vector3 &look = camera.get_look_direction();
float dist = get_distance();
- float low = view.get_layout().get_layout().get_catalogue().get_gauge()*5;
+ // XXX This should probably depend on the layout contents in some way
+ float low = 0.1;
if(dist+delta<low)
delta = low-dist;
camera.set_position(pos-look*delta);
float CameraController::get_view_scale() const
{
- float t = tan(camera.get_field_of_view()/2)*2;
+ float t = tan(camera.get_field_of_view()/2.0f)*2.0f;
return get_distance()*t;
}