"Swimming" Physics with Rigidbodies

I’ve always been stumped when it comes to this question. The best reference I can say is that I want to replicate a swimming physics setup like in Super Mario 64 (1996, Nintendo 64 title for those devs that go “uh?”).

In Mario 64’s implementation, there’s two things I can see - one, the gravity changes to a more “slower” pull down rather than the on-land gravity, and when you press A to swim it applies some upwards momentum, as well as the direction you’re traveling - so you end up going forwards on the Z axis Mario’s facing (so to speak) and also a little up on the Y axis.

Unlike previous attempts where I killed gravity all together and I’m not doing that again because it caused my character’s setup to do barrel rolls, I’m unsure how I would implement it.

I was wondering if anyone had any ideas on how to do underwater physics. I could use Character Controller and manually do gravity, but I perfer to use Rigidbody where possible (as it allows for more dynamic forces, etc). Do I tweak the gravity?

I do apologise for having no code, but I’m just collecting some implementation ideas before I put the pencil to the IDE.

Cheers!

Well. Irrelevant note, but I’m pretty sure every dev knows what you’re talking about when you mention SM64. But on topic; I think the best concept is to death the gravity and but keep friction. I don’t have code to show for this, but since you didn’t provide any, I am not obligated to either :stuck_out_tongue: But that concept is probably your best bet, as this is essentially what SM64 water physics does.

Alright, so what I did was increase the drag on the character, to cause it to slow down. So the winner is memorymod with a bonus point to darkhog.

Now… time to implement this with the controller scripts…

Thanks for the help, I appreciate it.