dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Sounds do not play right after teleporing a player

Open andreashgk opened this issue 3 years ago • 2 comments

Playing a sound right after teleporing a player like this:

p.Teleport(p.World().Spawn().Vec3Middle())
p.PlaySound(sound.EndermanTeleport{})

makes it so you cannot hear the sound at all. Waiting 1/20th of a second after teleporting the player does seem to fix it, however this feels more like a workaround.

andreashgk avatar May 05 '22 20:05 andreashgk

I've noticed this too. This is just a client issue I think, as Dragonfly sends the move packet right away, but I'm guessing the client actually interpolates that movement to some extent, causing it to arrive at the final position non-instantly with the sound not playing as a result. For the LevelSoundEvent sounds we can disable volume based on distance though, which works around it. I'm not sure if there is an equivalent for the LevelEvent packet though.

Sandertv avatar May 05 '22 20:05 Sandertv

I'm not entirely sure what we can do to resolve this. I'm adding a help wanted label.

Sandertv avatar May 28 '22 21:05 Sandertv