this is my current function (i looked all through the page to see if someone made a height function)
function Wave:GetHeight(pos)
local WorldPos = pos
local Settings = self._settings
local Direction = Settings.Direction
if Direction == EmptyVector2 then
-- Use Perlin Noise
Direction = Vector2.new(math_noise(WorldPos.X/NoiseModifier,WorldPos.Z/NoiseModifier,1),math_noise(WorldPos.X/NoiseModifier,WorldPos.Z/NoiseModifier,0))
else
Direction = GetDirection(Settings,WorldPos)
end
return Gerstner(WorldPos,Settings.WaveLength,Direction,Settings.Steepness,Settings.Gravity,self._time)
end
this is what i do to move the part in the video
local height = self:GetHeight(self._instance.Parent.Part.Position)
self._instance.Parent.Part.Position = height
video:
does anyone know how to get the height of the wave
Just shoot a raycast down with ocean only whitelisted. And you will get Y of that point. If you need me to explain or make a script for that, lemme know.