So I am a bit lost trying to play a sound without it playing at an angle. It's just supposed to play through both speakers equally at once since it's steps coming from the player themselves, but it seems to play at some weird angle
When it is from the player themselves, entity is null. That is the situation i'm having issues with
This is what I have:
public void playSound(Entity entity, String soundId, float pitch) {
if(settings.soundEnabled)
{
if(soundSystem.playing(soundId))
soundSystem.stop(soundId);
tick();
if(entity != null)
{
soundSystem.setPosition(soundId, entity.x, entity.y, entity.z);
soundSystem.setPitch(soundId, currentPitch);
soundSystem.setVolume(soundId, 1F);
soundSystem.setDistOrRoll(soundId, 16F);
soundSystem.setAttenuation(soundId, SoundSystemConfig.ATTENUATION_LINEAR);
soundSystem.play(soundId);
}
else
{
//My problem is here
soundSystem.setPitch(soundId, currentPitch);
soundSystem.setVolume(soundId, 1F);
soundSystem.setDistOrRoll(soundId, 0);
soundSystem.setAttenuation(soundId, SoundSystemConfig.ATTENUATION_NONE);
soundSystem.play(soundId);
}
}
}
Any suggestions?