Fix getting stuck when sliding and wrong capsule transform upon rotation

This commit is contained in:
tovjemam 2025-08-15 19:57:54 +02:00
parent ccc275c0f6
commit 441503234e

View File

@ -21,7 +21,7 @@ void game::Entity::Move(glm::vec3& velocity, float dt)
{
glm::vec3 u = velocity * dt; // Calculate the movement vector
const int MAX_ITERS = 4;
const int MAX_ITERS = 16;
for (size_t i = 0; i < MAX_ITERS && glm::dot(u, u) > 0.0f; ++i)
{
//printf("Entity::Move: Iteration %zu, u = (%f, %f, %f)\n", i, u.x, u.y, u.z);
@ -177,7 +177,7 @@ bool game::EntityOccurrence::Sweep(const glm::vec3& target_position, float& hit_
return sector_->SweepCapsule(
bt_capsule_,
normal_basis_,
inv_normal_basis_,
position_,
target_position,
hit_fraction,