fix calc_collsion_velocity_result for kinematic other body

This commit is contained in:
MihailRis 2026-03-14 18:49:59 +03:00
parent ad32d7b6db
commit 3ea3836f84

View file

@ -30,7 +30,7 @@ static glm::vec3 calc_collsion_velocity_result(
return vA;
}
if (glm::isinf(b.mass)) {
return vA * -a.elasticity + vB;
return vB - a.elasticity * (vA - vB);
}
const auto& mA = a.mass;
const auto& mB = b.mass;