So i want a wave with a buoyancy system but my waterplane spartial resolution is too low and i dont want to increase my 8k bone, Such that my waterplane interpolate it (as in skinned mesh) and so the wave your seing on screen is not the same as the one outputted by the formula
so i decided to do a boat
else
local neighborsplineX1 = math.floor(pos.X/47.619)*47.619
local neighborsplineX2 = math.ceil(pos.X/47.619)*47.619
local neighborsplineZ1 = math.floor(pos.Z/47.619)*47.619
local neighborsplineZ2 = math.floor(pos.Z/47.619)*47.619
local neigborhX1Z1 = GetYFromWaveForCalculus(Vector3.new(neighborsplineX1,0,neighborsplineZ1),t).Y
local neigborhX2Z1 = GetYFromWaveForCalculus(Vector3.new(neighborsplineX2,0,neighborsplineZ1),t).Y
local neigborhX2Z2 = GetYFromWaveForCalculus(Vector3.new(neighborsplineX2,0,neighborsplineZ2),t).Y
local neigborhX1Z2 = GetYFromWaveForCalculus(Vector3.new(neighborsplineX1,0,neighborsplineZ2),t).Y
local xsubtraction = pos.X - neighborsplineX1
local valuex = Lerp(neigborhX1Z1,neigborhX2Z1,xsubtraction)
local zsubtraction = pos.Z - neighborsplineZ1
local valuez = Lerp(neigborhX1Z1,neigborhX1Z2,zsubtraction)
--print(valuex+valuez)
return Vector3.new(0,valuex+valuez,0)
end
it uses the same formula and it also uses the distance between each bone while this work, its kinda broken, Sometimes the boat is above the wave, Sometimes it is under, But still it is still close (1-5 stud) of the wave height, Anyway i could get it exact?