mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:28:13 +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
|
// 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
|
// points to compute the penetration direction. Instead we use the unitary components of
|
||||||
// cubeContact.
|
// cubeContact.
|
||||||
direction = cubeContact / halfCubeSide;
|
glm::modf(cubeContact / halfCubeSide, direction);
|
||||||
glm::modf(BA, direction);
|
|
||||||
lengthDirection = glm::length(direction);
|
lengthDirection = glm::length(direction);
|
||||||
} else if (lengthDirection > sphereRadius) {
|
} else if (lengthDirection > sphereRadius) {
|
||||||
collisions.deleteLastCollision();
|
collisions.deleteLastCollision();
|
||||||
|
|
Loading…
Reference in a new issue