Skip to content

Commit

Permalink
Make debug fluid white so it can be colored to anything if needed. (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ughuuu authored Apr 15, 2024
1 parent 9dc44fe commit ac3743e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/fluids/fluid_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ Fluid2D::Fluid2D() {
}
rid = rapier_physics_server->fluid_create();
radius = RapierProjectSettings::get_fluid_particle_radius();
color = ProjectSettings::get_singleton()->get("debug/shapes/navigation/geometry_face_color");

debug_draw = RapierProjectSettings::get_fluid_draw_debug();
if (Engine::get_singleton()->is_editor_hint()) {
Expand Down Expand Up @@ -196,7 +195,7 @@ void Fluid2D::_notification(int p_what) {
if (debug_draw) {
points = get_points();
for (int i = 0; i < points.size(); i++) {
draw_rect(Rect2(points[i] - Vector2(radius / 2.0, radius / 2.0), Vector2(radius, radius)), color);
draw_rect(Rect2(points[i] - Vector2(radius / 2.0, radius / 2.0), Vector2(radius, radius)), Color::named("WHITE"));
}
}
} break;
Expand Down
1 change: 0 additions & 1 deletion src/fluids/fluid_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class Fluid2D : public Node2D {
bool enabled = true;
bool debug_draw = false;
real_t density = 1.0;
Color color;
TypedArray<FluidEffect2D> effects;

PackedVector2Array points;
Expand Down

0 comments on commit ac3743e

Please sign in to comment.