fixed client player going crazy on spawn

This commit is contained in:
2024-08-22 10:25:01 +02:00
parent 5afd01cf05
commit 81383cb39e
5 changed files with 17 additions and 8 deletions

View File

@@ -20,7 +20,10 @@ using namespace godot;
void Player::_bind_methods() {}
Player::Player() : m_PeerId(0) {}
Player::Player() : m_PeerId(0) {
// we set the player to an invalid position
set_position({-99999, -999999, -999999});
}
Player::~Player() {}
@@ -31,9 +34,6 @@ void Player::_ready() {
DEV_ASSERT(m_Mesh);
DEV_ASSERT(m_AnimationTree);
set_position({0, 0, 0});
set_velocity({0, 0, 0});
animate(0);
}