I am trying to make the ocean have some sort of swimming system like games such as SOT or something in Roblox like arcane odyssey.
I haven’t found any good solutions to making a water system with my ocean system and I am in really need of some tips or maybe links to posts about how to make something like that, as you can see you kinda just go through the water lol.
I am not really sure where to start as I can’t find anything on the dev forum.
If anyone could help me it’d be much appreciated, Thanks.
well, I’m not sure how you want your swimming to work but this is what mine came out to be:
All I’m doing is calculating the water level at the current position (skinned mesh y position + transform offset) and then checking if the players humanoid root part is under that + an offset. If they are then I just pass in the water level to a align position with only force on the y axis so the player can still move on the x and z axis. I also just apply a impulse to the player when they press space so that you can jump out of the water (with a cooldown) because by default you would be stuck. Hope this helps!
I believe OP wants to retain terrain water swimming behavior. In this case I’d recommend using a LinearVelocity, BodyGyro and changing humanoid state to swimming. However they will have to turn off EvaluateStateMachine and program a movement system themselves.
OP mentioned swimming such as “Arcane Odyssey” which has swimming implemented as I posted, however I’m not sure what SOT is if that’s what you are referring to.