Skip to content

Underflow causing panic when generating mesh. #29

@Larbino1

Description

@Larbino1

Hi there! Thanks for making this crate. I'm just getting started using it and encountering this panic when generating a mesh:

thread 'Async Compute Task Pool (0)' panicked at /home/daniel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rerecast-0.1.1/src/contours.rs:32:21:
attempt to subtract with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_rerecast_core::generator::poll_tasks`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!

The problem seems to be that self.height - self.border_size*2 is less than zero.

This must be a silly edge case due to my scene being empty apart from a flat plane, but maybe it could be handled in some way. I'm not familiar enough with the area/package to suggest how. In my case adding another plane offset by 5.0 in each axis fixed the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions