FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.74k stars 405 forks source link

Ragdoll mechanics bug upon contact with water and/or submarine bumping at high speed #9694

Closed TroyanosNoGracias closed 1 year ago

TroyanosNoGracias commented 2 years ago

Disclaimers

What happened?

Sometimes, when a character touches water coming in the submarine at high speeds, or is inside a submarine that gets suddenly bumped, his ragdolls mechanics get absolutely destroyed and such character is able to brutally go through walls, even getting outside of the submarine.

The modlist does not include any heavy overhaul mods except for Lua for Barotrauma and performance fix, AFAIK.

<mods name="modlist">
  <Vanilla />
  <Workshop name="Lua For Barotrauma" id="2559634234" />
  <Workshop name="Performance Fix" id="2701251094" />
  <Workshop name="Fortunate Worm" id="2702843916" />
  <Workshop name="Ryan Gosling face replacer" id="2786848700" />
  <Workshop name="BaroDrama V3.1" id="2719602039" />
  <Workshop name="BetterFabricatorUI" id="2811300302" />
  <Workshop name="EK | Utility" id="1946765892" />
  <Workshop name="EK | Armory" id="1769403760" />
  <Workshop name="EK | Gunnery" id="2390126010" />
  <Workshop name="Ulysses 2.37" id="1768666616" />
  <Workshop name="MoreHeadgear" id="2291500113" />
  <Workshop name="Aliens (Xenomorphs, neomorphs, etc)" id="2510534927" />
  <Workshop name="Sunken Tapes" id="2616577901" />
  <Workshop name="Backpacks" id="2613901395" />
  <Workshop name="Enhanced Armaments" id="2764968387" />
  <Workshop name="ADV Beacon Stations" id="2544952900" />
  <Workshop name="New Wrecks For Barotrauma (With sellable wrecks)" id="2184257427" />
  <Workshop name="Shipwrecks Extended" id="2095211492" />
  <Workshop name="Breaking Bad Guitar" id="2674501807" />
  <Workshop name="Amogus Companion" id="2792518472" />
  <Workshop name="Stations from beyond" id="2585543390" />
</mods>

Video proof: https://cdn.discordapp.com/attachments/157565009726144513/1007001359851192381/Barotrauma_2022.08.10_-_20.59.41.03.DVR_Trim.mp4

Reproduction steps

There's no clear reproduction steps other than putting the submarine at high speed and bumping it or letting a big monster attack it while there's a big flow of water coming out.

This bug DOES happen in singleplayer. I am NOT THE ONLY ONE with this bug since it happened to other members of my crew. This bug DOES happen in vanilla submarines. This bug HAS NOT been tested in full vanilla.

Bug prevalence

Happens regularly

Version

0.18.15.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

Ek-Videogames commented 2 years ago

Sounds like textbook physics-engine tunneling due to high speed & maybe moderate amounts of lag, or occasionally issues with hulls can cause characters to get teleported into or out-of the bounds of submarines; either by thinking a character is supposed to be inside the hull when they're outside, or outside the hull when they're inside.

TroyanosNoGracias commented 2 years ago

May be. The thing is it happened in singleplayer, too.

NilanthAnimosus commented 2 years ago

Thanks for the report!, Looked into this on 0.18.15.1.

With submarines hitting at high speeds I couldn't reproduce phasing through the hull for the collider itself without additional actions, but the limbs were capable of lagging extremely behind on single player (Though in theory, if a submarine and characters speed difference was so great they basically exceed the collider of a submarine wall or such in a singular update, perhaps they would phase through the walls?)

In my testing I used a submarine (Humpback in this case) and godmoded the submarine, took it to the abyss and maxed the speed left/right trying to hit a player in single player using an underwater scooter towards the submarine.

so here is the effect of high-speed drag, collider at the top-left yet the players limbs are pretty much in the submarine: image

Now for the weird part, if you use the ragdoll button when the majority if your limbs are through a wall, you have a very high chance to end up phasing through it, leading to funny moments like this: image

image

In regards to the video, since I've established ragdolling (and thus any temporary stun from perhaps an impact) could cause phasing through walls when the ragdoll physics are at high speed/unusual, it does explain perhaps how the player ended up teleporting through the wall in the video. going frame by frame made it looked like they sort of "Very rapidly moved left" through a horizonal floor piece of the submarine as they fell downwards into a hatch between hulls, effected by strong water forces, straight left out through a vertical wall (?)

image

(just a few frames/fractions of a second later): image

(another 1-4 frames?) image

and then the player ends up on the otherside of the leftmost wall, and is clearly outside the submarine and pressure crushed: image

Finally one last key detail from the video - during their very rapid movement from inside to outside the submarine, their inventory UI was hidden, further indicating this could be strictly related to high speed ragdolled characters.