Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: DebugDraw.draw_grid generates an error on Godot 4.0 #17

Closed
skooter500 opened this issue Jul 10, 2023 · 2 comments
Closed

[Bug]: DebugDraw.draw_grid generates an error on Godot 4.0 #17

skooter500 opened this issue Jul 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@skooter500
Copy link

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

https://github.com/skooter500/miniature-rotary-phone

@skooter500 skooter500 added the bug Something isn't working label Jul 10, 2023
@DmitriySalnikov
Copy link
Owner

DmitriySalnikov commented Jul 10, 2023

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

@skooter500
Copy link
Author

Ok great. I tested in Godot 4.1 with the new libraries and it works now. Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants