diff --git a/gazebo/rendering/Light.cc b/gazebo/rendering/Light.cc index 9752bf9a00..4aa059217f 100644 --- a/gazebo/rendering/Light.cc +++ b/gazebo/rendering/Light.cc @@ -318,8 +318,8 @@ void Light::CreateVisual() double angles[2]; double range = 0.2; - angles[0] = range * tan(outerAngle); - angles[1] = range * tan(innerAngle); + angles[0] = range * tan(outerAngle / 2); + angles[1] = range * tan(innerAngle / 2); unsigned int i = 0; this->dataPtr->line->AddPoint(ignition::math::Vector3d(0, 0, 0));