Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
ed2bbdbb
Unverified
Commit
ed2bbdbb
authored
Jun 22, 2020
by
Aaron Franke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid errors when the editor camera is inside the focused object
Prevent the gizmo distance from being zero by MAX-ing it with CMP_EPSILON
parent
10d2fa42
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
node_3d_editor_plugin.cpp
editor/plugins/node_3d_editor_plugin.cpp
+1
-1
No files found.
editor/plugins/node_3d_editor_plugin.cpp
View file @
ed2bbdbb
...
...
@@ -3208,7 +3208,7 @@ void Node3DEditorViewport::update_transform_gizmo_view() {
Vector3
camz
=
-
camera_xform
.
get_basis
().
get_axis
(
2
).
normalized
();
Vector3
camy
=
-
camera_xform
.
get_basis
().
get_axis
(
1
).
normalized
();
Plane
p
(
camera_xform
.
origin
,
camz
);
float
gizmo_d
=
M
ath
::
abs
(
p
.
distance_to
(
xform
.
origin
)
);
float
gizmo_d
=
M
AX
(
Math
::
abs
(
p
.
distance_to
(
xform
.
origin
)),
CMP_EPSILON
);
float
d0
=
camera
->
unproject_position
(
camera_xform
.
origin
+
camz
*
gizmo_d
).
y
;
float
d1
=
camera
->
unproject_position
(
camera_xform
.
origin
+
camz
*
gizmo_d
+
camy
).
y
;
float
dd
=
Math
::
abs
(
d0
-
d1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment