crashcat docs
    Preparing search index...
    • Replace collision normal with triangle normal when hitting an inactive edge.

      Prevents "ghost collisions" at interior triangle mesh edges by detecting when a collision point lies on or near an inactive edge, and returning the triangle normal instead of the calculated collision normal.

      Parameters

      • v0: Vec3

        first triangle vertex (local space)

      • v1: Vec3

        second triangle vertex (local space)

      • v2: Vec3

        third triangle vertex (local space)

      • triangleNormal: Vec3

        triangle normal (unnormalized OK)

      • activeEdges: number

        3-bit mask: bit 0 = edge v0-v1, bit 1 = edge v1-v2, bit 2 = edge v2-v0

      • point: Vec3

        collision point on triangle (local space)

      • normal: Vec3

        collision normal from GJK/EPA (unnormalized OK)

      • movementDirection: Vec3

        velocity hint for resolving ambiguous cases (can be zero)

      Returns Vec3

      corrected collision normal (returns input normal or triangle normal)