0.10.21 - Crouching movement bugged

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
King of Worms
Posts: 3047
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

0.10.21 - Crouching movement bugged

Post by King of Worms » Wed Mar 25, 2020 10:04 am

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.

User avatar
pango
Posts: 2184
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by pango » Wed Mar 25, 2020 10:51 am

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
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
King of Worms
Posts: 3047
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by King of Worms » Wed Mar 25, 2020 5:48 pm

I had a very faint idea that unstick or some mechanism like that might be it :)

User avatar
pango
Posts: 2184
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by pango » Wed Mar 25, 2020 7:18 pm

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
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
King of Worms
Posts: 3047
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by King of Worms » Thu Mar 26, 2020 9:54 am

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.

User avatar
King of Worms
Posts: 3047
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by King of Worms » Sun Mar 29, 2020 7:36 pm

Im not sure if I should report this issue with Movement acceleration on the Git?

User avatar
pango
Posts: 2184
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by pango » Sun Mar 29, 2020 8:24 pm

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.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
King of Worms
Posts: 3047
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: 0.10.21 - Crouching movement bugged

Post by King of Worms » Mon Mar 30, 2020 10:32 am

Cool now we know whats happening :)
If the sensitivity of the trigger can be at least partially reduced, it will be good

Post Reply