BoyC.2653:

Hi there,

I’m developing an overlay for GW2 using only the mumble API (for now).

With the latest feature I added I noticed something odd: the distance between the camera and the character position supplied by the mumble link data seems to jump around (in the range of about 1 world space unit) when the character is moving. Only rotating the camera around the character doesn’t produce any such artifacts, and the mumble link seems to be working just fine otherwise.

After looking into the issue I came to the conclusion that the client probably supplies some form of raw data for the character position that’s calculated before any display interpolation happens.

I’m wondering if anyone ran into the same issue before (the searches I did were of no help), and if this is something that could be fixed either on my side (by some magic interpolation techniques) or better yet, in the client.

Thanks.

BoyC.2653:

Averaging camera space character positions seems to work well against the issue, but it does introduce a quite noticeable latency when the camera distance changes too fast.

aRestless.6213:

What you’re experiencing here is probably simply the result of a dirty read.

The character moves, “away” from the camera. GW2 updates the MumbleLink data. Probably first the character position, then the camera position. If you access the data between those two, you already have the new character position, but still the old camera position, which is the reason why the distance fluctuates.

There’s no way around that. GW2 could set a “writing” flag in the mumble data during the write process, which could be used in conjunction with the tick field to identify most dirty reads, but that would still be a bandaid fix.

aRestless.6213:

Alright, I take that back.

The camera lags behind. Without touching the mouse, only while running around, I compared the distance traveled by the camera to the distance traveled by the avatar. While moving the character on an even underground, the distance traveled by the avatar is significantly larger than the distance traveled by the camera (and this difference jitters quite a lot). When I then stop moving, the difference shrinks back to roughly 0 (only roughly because of rounding errors I presume).

So yeah, there’s something odd about that data. Maybe in the on-frame calculations, the camera’s position is adjusted to the avatar’s position after the Mumble data was pushed out.