Make quads collide only on one side

This commit is contained in:
James Lambert 2023-01-20 12:51:41 -07:00
parent 68f39f24f2
commit f5bf61d664
3 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1 @@
-c 1 -r 22050

View file

@ -0,0 +1 @@
-c 1 -r 22050

View file

@ -149,6 +149,11 @@ void collisionObjectCollideWithQuadSwept(struct CollisionObject* object, struct
return;
}
// quads with a thickness of 0 are one sided
if (quad->thickness == 0.0f && vector3Dot(&result.normal, &quad->plane.normal) < 0.0f) {
return;
}
int touchingPortals = collisionSceneIsTouchingPortal(&result.contactA, &result.normal);
if (touchingPortals) {