Avatar Goes Flying When Exiting Seat Underwater

Every time we drive a vehicle under the water in the game, when the player jumps out, the user goes flying across the map. This happens most when the player is half in and half out of the water while seated. The sudden application of water physics to the player makes them go flying and this issue has been around for years and we have tried finding several workarounds to no avail. It would be great if there were a toggle to disable water physics or edit water physics. This would massively benefit the game and resolve this bug for me and other games.

Uploading: Snapchat-2086371623.mp4…

Expected behavior

The player should not go flying when exiting the seat underwater or half underwater. Rather they should just jump out and be swimming with no flinging involved.

1 Like

Thanks for reporting!

Looks like the video didn’t upload properly. Would it be possible to make a reproduction file that demonstrates this behavior?

1 Like

1 Like

That is quite the launch! Could you please attach the corresponding .rbxl file?

Thanks!

1 Like

WaterFlingingTest.rbxl (295.7 KB)

Simply drive the car into the water and jump out. Even the vehicles made by you guys have this issue, albeit much less frequently.

1 Like

Awesome, thanks! We have some theories as to what’s going on, we’ll take a look soon.

2 Likes

I strongly encourage Roblox to add more functionality to water and I am confident that we would be able to solve the issue that way, such as disabling water physics entirely and just having it there for visuals. Editing the properties of water physics would also be absolutely massive so you can adjust the density of it and things of that nature.

Do you have any updates or leads?

I’ve tracked down the issue of avatars launching out of vehicles underwater. It’s related to the vehicle seat script and how it manages avatar density.

Currently, the vehicle script in the repro uses server-side callbacks to set the avatar’s density to zero when seated and restore it when exiting. The problem arises underwater because of the server processing delay. When an avatar exits the vehicle underwater, the client’s avatar density remains near zero before the server update arrives. This low client-side density, combined with the subsequent buoyancy application, causes the excessive acceleration and launch.

A potential solution is to change the seat script to handle density changes on the client side. Updating the avatar density immediately on the client upon exiting should prevent this issue.

I’ve simplified your reproducer to a simple seat that similarly modifies the densities. I can recreate the flying-away behavior if I register the callbacks on the server:

The problem goes away if I register the callbacks on the client:

You’ll need to adopt this solution to your exact situations but hopefully something like this should work!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.