Add a simple water mask that allows the raft to go below sea level. Mask should be a 3d mesh cube that masks the water texture.
Requirements
[ ] must be feature flagged under raft a new section called raft buoyancy config.
[ ] must be simple computation from the raft prefabs placed to get the smallest 3d cube within the bounds of the vehicle. Smallest cube to prevent mask clipping through the sealed hull and breaking immersion as this will make the sea floor visible.
[ ] on the ship the player must be able to walk underwater and have it's camera not bounce off the mesh. This will require a player camera patch. Must be tied to the water mask feature flag.
[ ] Allow placement of pieces and objects and interaction underwater within the boat.
Portals must be fixed
[ ] Prevent drowning and player deaths when teleporting to vehicle underwater.
[ ] Fix player water level issues with sea level floatation point not syncing properly when teleporting.
[ ] Keep player frozen and continuously sync to the portal position until the raft ball has built itself around the player.
coloring and tint could be inspired from vikings do swim to wrap holes in the ship to show the water.
Breach logic (likely bonus)
color and mesh for water in boat due to breach would need to be forked from main game shader for water which would be masked.
show water up to the level of the breach of breach is below waterline.
set the player to swimming at the interior water line.
add a fill ui which shows that the boat is losing buoyancy and will sink.
Could add a transform to make the boat slowly decrease in water level
Testing
multiplayer raft teleport
[ ] is stable when teleporting to unrendered raft
[ ] is stable when teleporting to a raft with another player on it. Raft is rendered and the other player is owner of the physics.
Singleplayer
stable teleporting
stable entrance into underwater section
stable exit from underwater section
player can fall through bottom of boat broken boat and is considered swimming (and forced to surface).
Other mod support
needs to be compatible with Vikings do swim which will make it much more immersive to make a water displaced boat.
Out of scope
alternatively (bad perf) could bend a second mesh around the ship hull, but this would require a complex mesh collision detection. Might be possible if rigid body for pieces was disabled, but not possible with it being a kinematic sync.
bend the water around the boat by checking collisions of the water mesh and regenerating it based on the center of the pieces on the boat. This was done in a v1 buoyance branch. It's super rough but looks really cool.
Add a simple water mask that allows the raft to go below sea level. Mask should be a 3d mesh cube that masks the water texture.
Requirements
Breach logic (likely bonus)
Testing
multiplayer raft teleport
Singleplayer
Other mod support
Out of scope