Page 1 of 1

Thing position interpolation inconsistent between FP/TP

Posted: Sat Dec 23, 2017 4:51 am
by Nash
Run attached example. Observe the floating model in front of you while moving the player's view angle and pitch.

- In first person, the model appears jittery and is "lagging behind" the actual player view.
- In third person chase camera, the model is firmly planted in front of the player relative to the player view.

Expected behavior: in first person, the model is firmly planted in front of the player view.

Re: Thing position interpolation inconsistent between FP/TP

Posted: Wed Feb 28, 2018 6:52 am
by Graf Zahl
Looks correct to me with today's build. What version did this problem occur in?

Re: Thing position interpolation inconsistent between FP/TP

Posted: Wed Feb 28, 2018 8:21 am
by Nash
It still looks wrong with GZDoom g3.3pre-437-ge702504. Are you sure you don't have capped framerate turned on? I'm playing with uncapped framerate and it's very obvious. Try swiping your mouse very fast to the left or right while in first person view. Notice how jittery the model is. But if you do the same action while in third person view, it's not jittery.

Re: Thing position interpolation inconsistent between FP/TP

Posted: Wed Feb 28, 2018 8:25 am
by Graf Zahl
Capped frame rate is definitely off for me. The thing doesn't even move one pixel, regardless of what I do.

EDIT: I found the cause.
GZDoom allows to read mouse input per render frame if the update rate is high enough.

In that case I cannot help you because the player's camera position is no longer being interpolated between playsim frames but adjusted to the current mouse info in real time. But your model still only gets repositioned every 1/35 seconds per play tick.

This can be disabled by setting 'smooth_mouse' to true, and that's really the ONLY way your setup can possibly work ever. I have this variable enabled because my mouse got such a shitty update rate that otherwise the experience wouldn't be smooth anymore if mouse position was not interpolated between playsim frames.

Re: Thing position interpolation inconsistent between FP/TP

Posted: Wed Feb 28, 2018 8:27 am
by Nash
How odd! What else can I do to help you debug this? The model is definitely jittery for me only in first person.