I have this “Gerstner Waves” editable mesh
Currently I need to get the face that a vertex is attached to so I can use :SetVertexFaceNormal()
if not w then
--WaveA
for _, vert in mesh:GetVertices() do
local tan = Vector3.new(1,0,0)
local bi = Vector3.new(0,0,1)
local tan,bi,p = waveFunc(configsA,mesh:GetPosition(vert),tan,bi)
local normal = tan:Cross(bi).Unit
mesh:SetPosition(vert,p)
normal = mesh:AddNormal(normal)
mesh:SetVertexFaceNormal(vert,mesh:GetFacesWithAttribute(vert),normal)
end
end
end)
I’m using :GetFacesWithAtribute() but that’s deprecated so I can’t use it