update 'hitbox' property semantics

This commit is contained in:
MihailRis
2024-07-10 02:34:53 +03:00
parent 37f28a768c
commit 91230ecbeb
6 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -143,9 +143,10 @@ void CameraControl::switchCamera() {
}
void CameraControl::update(const PlayerInput& input, float delta, Chunks* chunks) {
offset = glm::vec3(0.0f, 0.7f, 0.0f);
offset = glm::vec3(0.0f, 0.0f, 0.0f);
if (auto hitbox = player->getHitbox()) {
offset.y += hitbox->halfsize.y * (0.7f/0.9f);
if (settings.shaking.get() && !input.cheat) {
offset += updateCameraShaking(*hitbox, delta);
}