Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#ThreeJS

Buoyancy and Water Physics Simulation in R3F

Customize the variables below to instantly engineer your prompt.

Required Variables

r3f-buoyancy-water-physics.txt
Act as a Simulation Programmer. Describe the complex mathematical implementation required to simulate realistic buoyancy for standard RigidBodies submerged within a virtual fluid volume in a React Three Fiber scene. You must script a custom physics tick that calculates the upward force vector based strictly on Archimedes' principle (displaced volume multiplied by [FLUID_DENSITY]). Simultaneously apply a heavy, velocity-dependent [DRAG_COEFFICIENT] vector to aggressively simulate physical water resistance the millisecond an object's Y-coordinate drops below the defined [WATER_LEVEL]. Detail exactly how to hook into the custom `useFrame` loop to apply these `applyImpulse` or `addForce` methods manually to Rapier bodies without breaking the engine's internal step logic.

Example Text Output

"A component wrapper that applies Archimedes' principle forces to any child RigidBody based on its Y-position."

More Web Components Prompts

View all →

Frequently Asked Questions

What is the "Buoyancy and Water Physics Simulation in R3F" prompt used for?

A component wrapper that applies Archimedes' principle forces to any child RigidBody based on its Y-position.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.