Do things

This commit is contained in:
Bailey Harrison 2023-02-13 11:27:18 +00:00
parent f32a42b393
commit 5890f94fe5
5 changed files with 7 additions and 25 deletions

View File

@ -23,8 +23,6 @@ set(SRC_FILES
"src/resources/mesh.cpp"
"src/resources/texture.cpp"
"src/event_system.cpp"
"src/scene.cpp"
"src/gfx_device_vulkan.cpp"

View File

@ -71,10 +71,10 @@ namespace engine {
class EventSystem {
public:
EventSystem();
EventSystem() {}
EventSystem(const EventSystem&) = delete;
EventSystem& operator=(const EventSystem&) = delete;
~EventSystem();
~EventSystem() {}
template <typename T>
void registerEventType()

View File

@ -1,15 +0,0 @@
#include "event_system.hpp"
namespace engine {
EventSystem::EventSystem()
{
}
EventSystem::~EventSystem()
{
}
}

View File

@ -150,7 +150,6 @@ namespace engine {
AABB object = possibleCollision.staticAABB;
info.point = object.pos2;
m_collisionInfos.emplace_back(possibleCollision.dynamicEntity, info);
}
}

View File

@ -41,16 +41,16 @@ void CameraControllerSystem::onUpdate(float ts)
const float dt = ts;
constexpr float G = 9.8f;
// constexpr float MAX_SLOPE_ANGLE = glm::radians(20.0f);
constexpr float MAX_SLOPE_ANGLE = glm::radians(1000.0f); // treat every collider as a floor, (TODO: get wall collisions working so this can be removed)
const float MAX_SLOPE_ANGLE = glm::cos(glm::radians(20.0f));
// constexpr float MAX_SLOPE_ANGLE = glm::radians(1000.0f); // treat every collider as a floor, (TODO: get wall collisions working so this can be removed)
constexpr float FLOOR_SINK_LEVEL = 0.05f; // how far into the floor to ground the player
glm::vec3 norm = c->lastCollisionNormal;
norm.y = 0.0f;
glm::vec3 dir = glm::normalize(glm::rotateY(glm::vec3{ 1.0f, 0.0f, 0.0f }, c->m_yaw) + glm::rotateY(glm::vec3{ 0.0f, 0.0f, 1.0f }, c->m_yaw));
const float slope = glm::length(glm::half_pi<float>() - glm::acos(glm::dot(dir, norm)));
const float slope = glm::dot(dir, norm);
INFO("slope: {}", slope);
bool isSliding = false;