H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 81 forks source link

Floating into air while swimming #1243

Open DoobesURU opened 2 years ago

DoobesURU commented 2 years ago

This appears to be something that happens on the OU client as well (to a lesser extent) and, with H'uru, is accentuated to where it's more noticeable, perhaps due to PhysX 4.1.

When either opening the large KI or Reltoing out (or Linking elsewhere using console) while swimming, the avatar will start to "float" into the air. For the former, on H'uru, this seems to happen in shallower water and the floating continues until the big KI is closed. For the latter, Linking out while swimming causes the avatar to float regardless of where they Link.

Also noticeable is that, on some occasions, the avatar will "stand" while in the water if the big KI is opened.

DoobesURU commented 2 years ago

Note that these conditions were recreated by myself, @DamnBriggsy , and Harley/Calum.

DamnBriggsy commented 2 years ago

Videos showing the bug in action on MOULa shard using the OU and H'uru clients.

OU: https://youtu.be/8ds235WZ-6E

H'uru: https://youtu.be/g9IclYTjRao

The latter was using my fork, a 'clean' client would be preferred. I'll try and upload a video of that if I get the chance.

Traveler263 commented 2 years ago

I believe the only notable difference between OU and HURU here is the PhysX Version- OU runs on 2pointsomething, and HURU is running on 4+. This is pretty much a handling bug in the code and since the OU client will EVENTUALLY be moved over to PhysX4, it makes the most sense for the OU/PX2 version to be left alone and focus the efforts on HURU/PX4 given that the issue seems to pretty much be an issue in the PhysX Avvie handling.

Given Adam has remarked on things such as Avvies being able to walk into the sky by walking into a rock on Relto, the likely issue is that where PhysX2 tells the avvie to 'float' along with the current while doing an animation such as the KI or Linking, PhysX4 is adding a constant upwards vector towards the Avvie's movement in the current's forwards movement as well.

TLDR, The main issue is Avvies going flying while doing an animation in the water. It shouldn't do that. I believe PX4 is deciding "Oh, you want to FLOAT? I'll give you a FLOAT!" and sends the Avvie sky high by adding a constant upwards vector ALONG with the forwards vector decided by the current. It either needs to apply an equal downwards force, or just not push the avvies upwards at all.

@Hoikas 's job, I'd wager, is figuring out where the bug is actually going wrong in the Avvie Handling. PX2 likely is doing its job correctly in this case, even if the avvie looks bizzarely funny while doing it, so it may be worth looking at the PX2 handling to see what its doing here (Either pushing downwards with equal force or just not pushing upwards constantly) just as a benchmark.