audio test
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <filesystem>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "../audio/audio.h"
|
||||
#include "../window/Camera.h"
|
||||
#include "../window/Events.h"
|
||||
#include "../window/input.h"
|
||||
@@ -19,6 +20,7 @@
|
||||
#include "../world/Level.h"
|
||||
#include "../world/World.h"
|
||||
#include "../objects/Player.h"
|
||||
#include "../physics/Hitbox.h"
|
||||
#include "../logic/ChunksController.h"
|
||||
#include "../logic/LevelController.h"
|
||||
#include "../logic/scripting/scripting.h"
|
||||
@@ -148,6 +150,14 @@ void LevelScreen::update(float delta) {
|
||||
updateHotkeys();
|
||||
}
|
||||
|
||||
auto camera = level->player->camera;
|
||||
audio::setListener(
|
||||
camera->position,
|
||||
level->player->hitbox->velocity,
|
||||
camera->position+camera->dir,
|
||||
camera->up
|
||||
);
|
||||
|
||||
// TODO: subscribe for setting change
|
||||
EngineSettings& settings = engine->getSettings();
|
||||
level->player->camera->setFov(glm::radians(settings.camera.fov));
|
||||
|
||||
Reference in New Issue
Block a user