Skip to content

Feat/render fluids#90

Merged
Satvik-Singh192 merged 2 commits intodevfrom
feat/render__fluids
Mar 30, 2026
Merged

Feat/render fluids#90
Satvik-Singh192 merged 2 commits intodevfrom
feat/render__fluids

Conversation

@Just-Here-TO-Code
Copy link
Copy Markdown
Collaborator

Description

Improves buoyancy test containment and visuals by rendering an open-top beaker (sides + bottom only), adding invisible bottom/side colliders to prevent escape, and tinting the water a clearer blue.


Changes Made

  • renderer/window.cpp: hide the Constraints menu when world.enable_buoyancy is active.
  • renderer/drawbodies.cpp: render the beaker glass as an open-top box (no top face) and keep it properly positioned above the floor.
  • renderer/drawbodies.cpp: draw water as semi-transparent blue fill inside the beaker volume (with a subtle surface layer).
  • renderer/drawbodies.cpp: add invisible static beaker wall colliders on the sides and a thin bottom plate so spawned bodies cannot escape sideways/downward.
  • renderer/bodymenu.cpp: suppress these invisible beaker wall collider bodies in the body inspector.

Implementation Details

  • The beaker glass uses an “open-top” box mesh that omits the +Y (top) face while keeping the side and bottom faces.
  • Invisible wall colliders are thin box colliders aligned to the beaker’s X/Z boundaries and a bottom plate aligned to the beaker’s bottom.
  • Water fill and surface are rendered using the beaker’s inner volume dimensions, with updated blue-tinted RGBA values for clearer visibility.

Checklist

Type:

  • Bug Fix
  • Feature
  • Chore

@Satvik-Singh192 Satvik-Singh192 merged commit 38f92a9 into dev Mar 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants