mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Draw fewer fishbones to improve Path gizmo readability and performance
This affects both Path2D and Path3D.
This commit is contained in:
@@ -138,13 +138,14 @@ void Path2D::_notification(int p_what) {
|
||||
draw_polyline(v2p, get_tree()->get_debug_paths_color(), line_width, false);
|
||||
}
|
||||
|
||||
// Draw fish bones
|
||||
// Draw fish bone every 4 points to reduce visual noise and performance impact
|
||||
// (compared to drawing it for every point).
|
||||
{
|
||||
PackedVector2Array v2p;
|
||||
v2p.resize(3);
|
||||
Vector2 *w = v2p.ptrw();
|
||||
|
||||
for (int i = 0; i < sample_count; i++) {
|
||||
for (int i = 0; i < sample_count; i += 4) {
|
||||
const Vector2 p = r[i].get_origin();
|
||||
const Vector2 side = r[i].columns[1];
|
||||
const Vector2 forward = r[i].columns[0];
|
||||
|
||||
Reference in New Issue
Block a user