Browse Source

Merge pull request #11767 from Noshyaar/pr-๒

3DEditorGizmo: fix spotlight and camera gizmo & handle
Andreas Haas 8 years ago
parent
commit
15dd5c2c60
1 changed files with 2 additions and 2 deletions
  1. 2 2
      editor/spatial_editor_gizmos.cpp

+ 2 - 2
editor/spatial_editor_gizmos.cpp

@@ -744,7 +744,7 @@ static float _find_closest_angle_to_half_pi_arc(const Vector3 &p_from, const Vec
 	}
 
 	//min_p = p_arc_xform.affine_inverse().xform(min_p);
-	float a = Vector2(min_p.x, -min_p.z).angle();
+	float a = (Math_PI * 0.5) - Vector2(min_p.x, -min_p.z).angle();
 	return a * 180.0 / Math_PI;
 }
 
@@ -893,7 +893,7 @@ void LightSpatialGizmo::redraw() {
 
 	if (Object::cast_to<SpotLight>(light)) {
 
-		Ref<Material> material = create_material("light_spot_material", gizmo_color, true);
+		Ref<Material> material = create_material("light_spot_material", gizmo_color);
 		Ref<Material> icon = create_icon_material("light_spot_icon", SpatialEditor::get_singleton()->get_icon("GizmoSpotLight", "EditorIcons"));
 
 		clear();