Page 1 of 1

0.10.21 - Crouching movement bugged

Posted: Wed Mar 25, 2020 10:04 am
by King of Worms
When you crouch and stand still for a second and than press forward in 50% of cases the movement will start with some sort of abrupt skip.
Its not smooth as when you are standing. Try it few times and you will see it most likely.

Re: 0.10.21 - Crouching movement bugged

Posted: Wed Mar 25, 2020 10:51 am
by pango
It looks like "unstick handling" kicking in
https://github.com/Interkarma/daggerfal ... or.cs#L142

I wonder if it shouldn't be also reset (stuckFrameCount = 0, lastMovePosition = myTransform.position) when the player is idle (ie when tryingToMoveForwards || tryingToMoveBackwards is false) or if this was done on purpose, or is just an oversight.
Also, would that fix the use case you describe, that's something I need to experiment with

Re: 0.10.21 - Crouching movement bugged

Posted: Wed Mar 25, 2020 5:48 pm
by King of Worms
I had a very faint idea that unstick or some mechanism like that might be it :)

Re: 0.10.21 - Crouching movement bugged

Posted: Wed Mar 25, 2020 7:18 pm
by pango
Maybe I didn't understand the instructions correctly, but I can't reproduce the problem.

The fix I was talking about looks like this:
https://github.com/Interkarma/daggerfal ... /pull/1764

Re: 0.10.21 - Crouching movement bugged

Posted: Thu Mar 26, 2020 9:54 am
by King of Worms
I pinpointed the source of this issue :twisted:

Its caused by the setting I use and like:
Gameplay > Movement Acceleration

I use 7 to give my character some momentum - and thats where the bug is manifesting.

When I set it to max (effectively disabling the feature) the issue stops.

TO REPRODUCE:
Set Movement Acceleration to 7.0

Crouch. Stand still for 1 second. Press forward.
(Repeat this whole process 10 times to be sure, because the bug only happens in about 50% of the cases)

The movement u will see has a skip in it, its not smooth.

Re: 0.10.21 - Crouching movement bugged

Posted: Sun Mar 29, 2020 7:36 pm
by King of Worms
Im not sure if I should report this issue with Movement acceleration on the Git?

Re: 0.10.21 - Crouching movement bugged

Posted: Sun Mar 29, 2020 8:24 pm
by pango
I see, that makes sense. By adding inertia, your character keeps moving slowly for several frames. Combined with the slow base speed of crouching movements, that's enough to trigger unstick handling. That may be even easier to trigger with vsync off.

We can increase the number of frames necessary to trigger unstick handling, or better yet set a time threshold to avoid being dependant on the framerate; But no matter the limit they'll always be some inertia value that triggers it, I'm afraid.

Re: 0.10.21 - Crouching movement bugged

Posted: Mon Mar 30, 2020 10:32 am
by King of Worms
Cool now we know whats happening :)
If the sensitivity of the trigger can be at least partially reduced, it will be good