mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:43:03 +02:00
fix sphere-cube collisions at edges
This commit is contained in:
parent
0e3d66caf6
commit
6cc8d53a6d
1 changed files with 2 additions and 0 deletions
|
@ -701,6 +701,7 @@ void ShapeColliderTests::sphereTouchesAACubeFaces() {
|
||||||
|
|
||||||
for (int i = 0; i < axes.size(); ++i) {
|
for (int i = 0; i < axes.size(); ++i) {
|
||||||
glm::vec3 axis = axes[i];
|
glm::vec3 axis = axes[i];
|
||||||
|
std::cout << "adebug j = " << i << " axis = " << axis << std::endl; // adebug
|
||||||
// outside
|
// outside
|
||||||
{
|
{
|
||||||
collisions.clear();
|
collisions.clear();
|
||||||
|
@ -809,6 +810,7 @@ void ShapeColliderTests::sphereTouchesAACubeEdges() {
|
||||||
|
|
||||||
for (int i =0; i < axes.size(); ++i) {
|
for (int i =0; i < axes.size(); ++i) {
|
||||||
glm::vec3 axis = axes[i];
|
glm::vec3 axis = axes[i];
|
||||||
|
std::cout << "adebug i = " << i << " axis = " << axis << std::endl; // adebug
|
||||||
float lengthAxis = glm::length(axis);
|
float lengthAxis = glm::length(axis);
|
||||||
axis /= lengthAxis;
|
axis /= lengthAxis;
|
||||||
float overlap = 0.25f;
|
float overlap = 0.25f;
|
||||||
|
|
Loading…
Reference in a new issue