hi, i’m wondering how you can simulate the same buoyancy as the tweet above with gernster waves, i know you can get the X and Y of the wave but how do you get the angle?
If you know the angle of the wave, then you can form a CFrame that is similar to the current CFrame of your model, but with the Y axis matching the angle of the wave, then on a loop, lerp between the current CFrame of the Model, and the CFrame that’s perfectly matched to the wave.
If you want to get more fancy with it, you can add momentum to your boat, and instead of using lerp, you add a torque velocity to it, in the direction and magnitude of the difference, so that it has inertia. Though that requires a bit more math to implement.
that’s my issue i can’t figure out how to get the angle of the wave (the type is Gernster wave btw)
Are you using Roblox’s waves, or making your own? Because if you’re making your own, you can just sample points that intersect with your hull, and the average plane of the points is going to be the surface that the boat will be attempting to match, and the normal of that plane is going to be your up-vector.
i’m gonna make my own yes, but shouldn’t there be some sort of formula i can use for the angle?
If your sample points are volumetrically distributed across the boat, then you can look at each point as a vector, by subtracting the CG of the boat from the position of the volumetric point. Add all those vectors together, then unitize that “total” vector, and you’ll have the normal of the plane. This isn’t a very accurate method, it’s just a kinda-lazy method that will work.