Hello, where is the style, perhaps .xml, file for the 2d Debug Renderer? I’d like to modify the colors.
Also, is it possible to pass custom colors for certain shape objects, for example, one color for polygons, one for circles?
I’m using the lua scripting with the Urho3d Player but I can’t figure out where the debug colors come from. Is it a shader?
Also, apparently sending
for each rigidbody, without letting the DebugRenderer draw on its own, is magnitudes slower than letting the DebugRenderer do it.
The simulation I’m working on will work totally fine with simple 2d rigid bodies and forces. The built-in debug rendering is very fast and beats calculating rotations/vertex points and drawing all 2d geometry manually with AddPolygon. I tried that, and it’s just far too slow. I really don’t need or want any sprites or images.
From what I understand, U2D is mostly centered on sprites. Also, somehow drawing 200 sprite soccer balls is much faster than sending 200 AddPolygons to the DebugRenderer, but just letting the DebugRenderer do its thing with the Rigid Bodies is faster still. You would think the last two would be the same speed, but they aren’t. That’s weird.
So, I’m faced with two choices to maintain speed:
I create sprite images of 2d primitives, and then stretch and scale those, which seems really silly…
Or I figure out how to edit Debug Renderer colors, because while the rendering is great, I need separate colors to be set.
EDIT: elix22’s answer is correct, and what I was after. In my case, I needed to rebuild the Urho3dPlayer after making changes to the file mentioned. I’m sure there’s a more efficient way to build just the U3dPlayer, but I just modified that file in the Source folder, and then rebuilt the whole Urho3d folder using the “Getting Started” guide. It works exactly how I wanted and now the debug is coloring based on my changes.