Skip to content

Convex shape validator fails to validate bucket shape #224

Open
@CreativeTechGuy

Description

Example code:

const bucket = new planck.Polygon([
    { x: -30, y: -26 },
    { x: -26, y: -18 },
    { x: -20, y: 26 },
    { x: 22, y: 26 },
    { x: 28, y: -18 },
    { x: 32, y: -26 },
    { x: 32, y: 30 },
    { x: -30, y: 30 },
].map((v) => new planck.Vec2(v)));
console.log(bucket.validate()); // This shows true

Screenshot of the points on a coordinate plane:

image

This is not a convex shape, but for some reason the validator says it is. This might be related to #218 although I am not repeating my start/end points so there is probably a different issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions