INNER CODE UNIT · C++
mouse_x
trillek-team/tec · client/game.cpp:190
mouse_x = static_cast<double>(window_width) / 2.0;
mouse_y = static_cast<double>(window_height) / 2.0;
const auto intersection = ps.GetLastRayPos();
const auto player_position = ps.GetPosition(player_entity_id);
placement.SetRayIntersectionPoint(player_position.value, intersection);
}
else {
os.DisableMouseLock(); // TODO: create event to change from mouse look
OS::GetMousePosition(&mouse_x, &mouse_y);
}
this->active_entity = ps.RayCastMousePick(
this->server_connection.GetClientID(),
mouse_x,
mouse_y,
static_cast<float>(window_width),
static_cast<float>(window_height));
}
tfm.other_time = GetElapsedTime();