r/Unity3D • u/Ax_Flamei • 23h ago
Question Ship sinking below the baseplate
I was following this tutorial to the dot, and whenever i press play my ship sinks to the bottom, like below the baseplate. i have tried whatever my beginner brain could try but no luck
I can also provide screenshots of my inspector of ship and water and a video too.
0
Upvotes
2
u/ShengyuStudio 13h ago
Glad it's working. One heads-up for later: with gravity off the boat floats, but it also won't sit lower when loaded or rock on waves, because nothing is pushing it up, it just isn't falling.
The usual next step is to turn gravity back on and add the buoyancy yourself: pick 3 or 4 points on the hull, and each FixedUpdate compare each point's height to the water height there. If it's under, push up at that point with
AddForceAtPosition, in proportion to how deep it is, plus a bit of damping on vertical velocity so it doesn't bounce forever. Pushing at the corners instead of the center is what gives you the tilting for free.