mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 12:13:40 +02:00
fix for nan in sphereVsAACubeHelper()
This commit is contained in:
parent
4270c4d989
commit
a3b26582ba
1 changed files with 1 additions and 2 deletions
|
@ -676,8 +676,7 @@ CollisionInfo* sphereVsAACubeHelper(const glm::vec3& sphereCenter, float sphereR
|
|||
// sphereCenter is touching cube surface, so we can't use the difference between those two
|
||||
// points to compute the penetration direction. Instead we use the unitary components of
|
||||
// cubeContact.
|
||||
direction = cubeContact / halfCubeSide;
|
||||
glm::modf(BA, direction);
|
||||
glm::modf(cubeContact / halfCubeSide, direction);
|
||||
lengthDirection = glm::length(direction);
|
||||
} else if (lengthDirection > sphereRadius) {
|
||||
collisions.deleteLastCollision();
|
||||
|
|
Loading…
Reference in a new issue