Boat pawn controlled by physics, how to prevent sliding/drifting when turning? (waterbody UE4 blueprint)

I am working on a controllable pawn of a boat that is supposed to move inside the UE4 waterbody plugin. The movement is supposed to be quick and responsive since the game is in a stylized setting. I initially used the floating pawn movement component to control it, which worked perfectly fine until I noticed that its movement does not translate into any physical momentum. Meaning that as soon as the boat jumps off a waterfall or goes over a ramp, it instantly goes to a dead stop the second it comes out of the water, since I tied the controls to only function when the boat is within the waterbody.

Instead, I am now trying to make all the movement physics based using the addforce node. I can now get the boat to properly keep momentum when it gets out of the water, but the thing I am now struggling with is that the moment I try turning, it still maintains momentum in the direction it was going. This is mainly noticeable when I turn while moving forward without giving any further forward input. It’s supposed to steer into the direction that the bow points at, but instead the boat just spins around its axle while it keeps moving into the linear direction that it was originally going. If I do give forward input while turning, it looks like it is drifting on ice.

So far I am aware that the friction in the water does not take the shape of the boat into account. It might as well have been a ball. The thing is though that I have no idea on how to approach this so that it steers responsively like the movement component does.

Does anyone know how to approach this? Either a way to provide proper friction in the water, or perhaps a way to use the floating pawn movement in that it actually generates momentum. Simply increasing inertia doesn’t work since it also makes the ship fall as slow as if it’s on the moon. And neither increasing the general water friction since it will make the water act like syrup. I also wish to refrain from using Tick since I intend to have many boats in the scene at one point.

hi,
you could try Inverse Transform Direction to get your velocity in the local space… then cut off sideway force (y = 0) and transform it back to it´s world velocity and set it… this way you should be able to keep the forward velocity but remove any sideway velocity…

hope that helps you :slight_smile:

cheers :vulcan_salute:

1 Like

I think that might be exactly what I am looking for. Thank you very much for the suggestion! I’ll have a go at this.

1 Like

Hey @Mr_Robville,
Did this answer your question? I’m trying to solve a very similar thing (if not the exact same lol) and can’t quite get it to work. How were you able to solve it? --if you don’t mind me asking =)

@AustrianMunzter Would you mind helping me out with this problem? I’m not entorely sure how to use the “inverse transform direction” node. Tried a couple of times without any luck… =(