summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-10-02 10:59:39 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2017-10-02 10:59:39 +0700
commit520467376ba4ebcf59730f0e6af5fa41c7a50e01 (patch)
tree982fdc13b61ddd4a24eccdc0d824dd5fde3daa82
parentd3345121ccf12eb5f11f4200b3b4ddc92823817c (diff)
3DEditorGizmo: fix spotlight and camera gizmo & handle
-rw-r--r--editor/spatial_editor_gizmos.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 450c9f4b3c..3c1889e829 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/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();