Player's position is reset when close to ghosts

This commit is contained in:
five-hundred-eleven
2025-08-03 11:15:54 -04:00
parent 4aee63a4d3
commit faf3f239d8
12 changed files with 268 additions and 20 deletions

View File

@@ -250,6 +250,12 @@ void Player::apply_movement(float timed) {
}
void Player::reset_position(glm::vec3 startpos, float startyaw) {
position = startpos;
yaw = startyaw;
velocity = glm::vec3(0.0f, 0.0f, 0.0f);
}
glm::vec3 Player::get_normal_from_index(int ix) {
return glm::vec3(
wall_vertices[ix * 6 * 6 + 3],