fix player entity teleport using debug_panel

This commit is contained in:
MihailRis 2024-10-19 01:27:51 +03:00
parent 6dc73646f0
commit ba9417a7e4

View File

@ -185,8 +185,10 @@ void Player::postUpdate() {
void Player::teleport(glm::vec3 position) {
this->position = position;
if (auto hitbox = getHitbox()) {
hitbox->position = position;
if (auto entity = level->entities->get(eid)) {
entity->getRigidbody().hitbox.position = position;
entity->getTransform().setPos(position);
}
}