mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
fix PhysicsSolver::calcCollisionNegY
This commit is contained in:
parent
34cc778f0d
commit
3d9c831051
1 changed files with 4 additions and 1 deletions
|
|
@ -151,7 +151,10 @@ bool PhysicsSolver::calcCollisionNegY(
|
|||
continue;
|
||||
}
|
||||
auto aabb = AABB(pos - half, pos + half);
|
||||
aabb.scale(glm::vec3(1.0f - E * 4.0f, 1.0f - E * 2, 1.0f - E * 4.0f));
|
||||
glm::vec3 scale(1.0f);
|
||||
scale.x = 1.0f - E * 4.0f;
|
||||
scale.z = 1.0f - E * 4.0f;
|
||||
aabb.scale(scale);
|
||||
|
||||
auto boxhalf = box->getHalfSize();
|
||||
if (box->position.y < pos.y && box->getAABB().intersects(aabb)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue