[Bug]: DebugDraw.draw_grid generates an error on Godot 4.0
skooter500 opened this issue · 2 comments
Godot version
4.0.3.stable.mono
DebugDraw3D version
current
On which operating systems the error occurs
Windows
Using which renderers the error occurs
Vulkan
Issue description
Getting this:
E 0:00:03:0013 root.gd:11 @ draw_gizmos(): Condition "_subdivision.x > 1024 * 1024" is true.
<C++ Source> src\debug_geometry_container.cpp:602 @ DebugGeometryContainer::draw_grid_xf()
root.gd:11 @ draw_gizmos()
root.gd:23 @ _process()
Steps to reproduce
func draw_gizmos():
var size = 100
var sub_divisions = 10
# DebugDraw.draw_grid(Vector3.ZERO, Vector3.RIGHT* size, Vector3.BACK * size, Vector2(sub_divisions, sub_divisions), Color.AQUAMARINE)
# DebugDraw.draw_grid(Vector3.ZERO, Vector3.UP * size, Vector3.BACK * size, Vector2(sub_divisions, sub_divisions), Color.aquamarine)
DebugDraw.draw_grid(Vector3.ZERO, Vector3.RIGHT* size, Vector3.BACK * size, Vector2(sub_divisions, sub_divisions), Color.AQUAMARINE)
Minimal reproduction project
Second point #9
It would probably be worth pointing this out more explicitly somewhere..
It seems to be fixed only with the release of 4.1. I haven't checked yet.
It looks like the problem has really been fixed. In the addon_icon.tscn
test scene, I tried using Vector2
and no errors appeared.
DebugDraw.draw_grid_xf($gizmo/grid.global_transform, Vector2(2,2), DebugDraw.empty_color, false)
And I want to clarify that I will not be able to fix this by updating the library for Godot 4.0, because the fix was made to the Godot core. Maybe it was/will be cherry-picked in some Godot 4.0.x
Ok great. I tested in Godot 4.1 with the new libraries and it works now. Thanks!