#How do I implement a custom swimming system for a Gerstner Mesh Ocean

1 messages · Page 1 of 1 (latest)

tulip vortex
#

I am building a realistic ocean using a MeshPlane and Gerstner Waves for vertex deformation. Since this isn't Terrain Water, I need to manually handle the player's buoyancy and swimming state.I need to figure out how to efficiently handle Height Sampling so that I can get the wave's Y-position at the player’s exact X/Z coordinates, ensuring the character 'bobs' naturally with the water math. I also need advice on the best way to handle State Management, specifically how to force the Humanoid into a swimming state while correctly triggering attributes like IsUnderwater or IsSwimming for animations and effects. For the Physics, I’m currently using a VectorForce (or BodyPosition) for buoyancy, but I’m struggling to balance it so that it keeps the player at a consistent SURFACE_OFFSET while still allowing them to Jump at the surface without being pinned down. I'd also like the system to support diving and rising based on player input.

Additionally, does anyone know how I can adapt this logic to make Boats and Ships sit correctly on the water? I want them to follow the waves realistically using multiple float points instead of just a single center part.

idle cradle
#

yo i am doing the same thing

#

is your ssomethign like ts

#

i also have swimming

tulip vortex
#

I made this but didnt work

idle cradle
#

did you use ai

#

try first

#

to get the parts floating

#

then

#

swimming

#

parts are a bit easier

#

wait can you show me your

#

module

#

and how the plane looks like

#

the motion

#

then i can understand

#

a bi teasier

tulip vortex
wary warrenBOT
#

studio** You are now Level 1! **studio

tulip vortex
#

I used a free model for the mesh ocean

#

I used this

#

And Im gonna modify it

#

With the swimming

#

And use tweens to expand it infinetly

idle cradle
#

ohhh

#

i also wanted

#

that

#

but i didnt want to wait

#

a hour

#

so i made my own

#

but theres 2 ways

#

to go with a physics system

#

you make your own

#

by using anchored

#

for water, then you aslo got to make your own boat system, or you can use forces. but thats ahrder

idle cradle
#

if you want

tulip vortex
idle cradle
#

y

#

but mine is a bit different

#

can you show

#

your module script

#

for the waves

#

then i can understan

#

d

#

cuz in your script it look slike a heightfield map

#

not exactly a gerstner

#

but i may be wrong