Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.
This repository was archived by the owner on May 3, 2022. It is now read-only.

App Crash - Swift #3

Description

@ingeniousgenius

I am using this for my app in swift, I used a bridging header bit when anything collides with the body I get this error

Assertion failed: (area > 1.19209290e-7F), function ComputeCentroid, file /SourceCache/PhysicsKit_Sim/PhysicsKit-6.5.4/PhysicsKit/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 122.

And it throw's to this line of code

   return [SKPhysicsBody bodyWithPolygonFromPath:path.CGPath];

in this method

 +(SKPhysicsBody *) createBody: (NSArray *) body {
    UIBezierPath *path = [SKPhysicsBody generatePathFromArrayOfPoint:body];

    return [SKPhysicsBody bodyWithPolygonFromPath:path.CGPath];
  }

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