diff --git a/src/logic/PlayerController.cpp b/src/logic/PlayerController.cpp index 5885b728..f7b3b85b 100644 --- a/src/logic/PlayerController.cpp +++ b/src/logic/PlayerController.cpp @@ -248,7 +248,7 @@ void PlayerController::update(float delta, bool input, bool pause) { if (input) { updateInteraction(); if (Events::jactive("player.drop")) { - level->entities->drop(player->camera->position, player->camera->front*10.0f+player->hitbox->velocity); + level->entities->drop(player->camera->position, player->camera->front*8.0f+glm::vec3(0, 2, 0)+player->hitbox->velocity); } } else { player->selection.vox.id = BLOCK_VOID; diff --git a/src/objects/Entities.cpp b/src/objects/Entities.cpp index 56f52318..fd4fe76c 100644 --- a/src/objects/Entities.cpp +++ b/src/objects/Entities.cpp @@ -25,7 +25,8 @@ void Entities::drop(glm::vec3 pos, glm::vec3 vel) { glm::vec3 size(1); registry.emplace(entity, static_cast(1)); registry.emplace(entity, pos, size/4.0f, glm::mat3(1.0f)); - registry.emplace(entity, pos, size/2.0f); + registry.emplace(entity, pos, + glm::vec3(size.x*0.2f, size.y*0.5f, size.z*0.2f)); auto& hitbox = registry.get(entity); hitbox.velocity = vel; diff --git a/src/objects/Entities.hpp b/src/objects/Entities.hpp index 0a05bfba..8efc7197 100644 --- a/src/objects/Entities.hpp +++ b/src/objects/Entities.hpp @@ -24,6 +24,7 @@ class Level; class Assets; class ModelBatch; class Frustum; +class Rig; class Entity { entt::registry& registry; diff --git a/src/objects/rigging.hpp b/src/objects/rigging.hpp new file mode 100644 index 00000000..a509533b --- /dev/null +++ b/src/objects/rigging.hpp @@ -0,0 +1,34 @@ +#ifndef OBJECTS_SKELETON_HPP_ +#define OBJECTS_SKELETON_HPP_ + +#include "../typedefs.hpp" + +#include +#include +#include + +namespace rigging { + struct Rig; + + struct Pose { + std::vector matrices; + }; + + class RigNode { + uint index; + std::vector> subnodes; + public: + RigNode(uint index); + }; + + class RigConfig { + std::unique_ptr root; + }; + + struct Rig { + RigConfig* config; + Pose pose; + }; +}; + +#endif // OBJECTS_SKELETON_HPP_