The Silent Hunter series did a decent job at simulating the U-boat physics. If you play close attention though, you can somewhat tell they were a bit ‘scripted’.
For the U-boat Simulator, I am working with a very generic physics method aimed at somewhat accurately simulating a few key things:
- Air resistance (the conning tower has resistance applied to it when moving or in strong winds)
- Viscous water resistance
- Slamming forces
- And hydro-static forces (buoyancy)
To achieve a generic model, the U-boat and other boats in the game have a hidden optimized mesh model which represents the sub. Each frame, the mesh is recalculated into two pieces, one for above water, and one for under. Each triangle in the mesh then has the 4 values mentioned above computed. This means that the U-boats design plays a crucial role in it’s maneuvering profile.