Skip to content

[OoT] When exporting collision, check for degenerate triangles #633

@Thar0

Description

@Thar0

Degenerate triangles (triangles with close to 0 area, where all 3 vertices lie on or close to the same line) cause a crash during collision checking due to the assert at https://github.com/zeldaret/oot/blob/eb5dac74d6435baf85ced9158d3ff915ba8872ca/src/code/z_bgcheck.c#L751

When exporting the collision mesh, checking for these kinds of triangles and doing any of

  • Skipping exporting them, so they don't end up in game (but potentially creating very tiny holes in the mesh)
  • Warning about them on export, telling users there are degenerate triangles that need to be removed
  • Erroring on export, telling users there are degenerate triangles that need to be removed

would be preferable to the current situation where they are exported without issue, leading to users often encountering this crash once they're in-game.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ootHas to do with the Ocarina of Time 64 side

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions