How to remove water when it will get in the boat

Hi, I’m making a working boat but the water clips into it and I can’t make it any higher without making it look bad. How would I address this issue?
image

local captainSeat = script.Parent.CaptainSeat
local Params = RaycastParams.new()
Params.FilterDescendantsInstances = {workspace.Terrain}
Params.FilterType = Enum.RaycastFilterType.Include

captainSeat.Changed:Connect(function()
	script.AngularVelocity.AngularVelocity = Vector3.new(0, -1 * captainSeat.Steer, 0)
	script.LinearVelocity.LineVelocity = 50 * captainSeat.Throttle
end)

while task.wait() do
	local startingPos = script.Parent.CaptainSeat.Position + Vector3.new(0,5,0)
	local endingPos = script.Parent.CaptainSeat.Position - Vector3.new(0,15,0)
	local ray = workspace:Raycast(startingPos,endingPos - startingPos, Params)
	if ray and ray.Material == Enum.Material.Water then
		script.AngularVelocity.Enabled = true
		script.LinearVelocity.Enabled = true
	else
		script.AngularVelocity.Enabled = false
		script.LinearVelocity.Enabled = false
	end
end

image

1 Like

I wouldn’t address this issue anyhow. Keep the same space for the player but make the boat bigger, so the water is hidden. Eventually play with its physical properties so it floats better.

You could cover the top with a glass part with 0.9999999 transparency.
Although this would introduce specular highlights on the glass part.

However you can remove these highlights by reversing the part’s normals.
Here’s a flat circle mesh with reversed normals: Glass_Circle1.rbxm (4.0 KB)

Upon further testing, it seems like this will only work at 8 or higher graphics level.
Additionally if you move your camera under the mesh, you’ll be able to see the water.
Aside from those downsides, the mesh seems to work well.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.