in0finite / SanAndreasUnity

Open source reimplementation of GTA San Andreas game engine in Unity
https://discord.gg/p6jjud5
MIT License
2.16k stars 355 forks source link

Water physics #121

Open in0finite opened 2 years ago

in0finite commented 2 years ago

Implement water physics - water should push all bodies that touch it. Some bodies will float on top, some will sink down.

Each vehicle has percentage submerged defined in data files.

Water script already has the ability to generate colliders (as triggers). Objects that are able to interact with the water should detect collision with trigger and apply appropriate force.

When object collides with water, emit some water particles.

Maybe first search for already finished solution online.