fix player entity teleport using debug_panel
This commit is contained in:
parent
6dc73646f0
commit
ba9417a7e4
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user