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]: Can't Draw In Viewports that use thier own worlds #35

Closed
lucidium4 opened this issue Jan 31, 2024 · 4 comments
Closed

[Bug]: Can't Draw In Viewports that use thier own worlds #35

lucidium4 opened this issue Jan 31, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lucidium4
Copy link

lucidium4 commented Jan 31, 2024

Godot version

v4.2.1.stable.official [b09f793f5]

DebugDraw3D version

1.3.1

On which operating systems the error occurs

Windows

Using which renderers the error occurs

Vulkan mobile

Issue description

Debug Draw 3D Can't be use in Viewport that have thier on worlds.

Steps to reproduce

Run the project with the "Own World 3D" variable on and off on the SubViewport

Minimal reproduction project

SubViewportBug.zip

@lucidium4 lucidium4 added the bug Something isn't working label Jan 31, 2024
@DmitriySalnikov
Copy link
Owner

This is expected, because in order to draw graphics, it needs to be added to some of the worlds. By default, the world of the root of the game is used.

I already have a method that changes the world for all meshes, but only 1 world can be selected. This method only needs to be exposed.

At the moment, a separate mesh is being created for each shape, there are 19 in total. +1 for lines. There is also a division into _process and _physics_process. That is, (19 + 1) * 2 meshes are created for one world.

I think it's not very difficult to add support for other worlds, but it will probably reduce performance a little more. And somehow you need to specify the world in which to draw (scoped configs are most likely).

@DmitriySalnikov
Copy link
Owner

I have added the ability to change World3D for the entire geometry. You can check how set_world_3d_from_viewport works using binaries from here.

The next goal is to be able to render to multiple Worlds at the same time, but I'm not completely sure how this will be implemented.

@DmitriySalnikov
Copy link
Owner

godot windows editor dev x86_64 mono_sxaI5oAoGT
more edits are needed, but the main part is already working.

@skooter500 skooter500 mentioned this issue Mar 12, 2024
@DmitriySalnikov
Copy link
Owner

fixed #42

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