[Physics Problem] I can't play my Game.

  • Well, I've recently installed the lastest version of C2 (r185) Beta, and when I chose to test my game I get the following error:

    Uncaught node.js Error 
    
    Assertion failed: 3 <= count && count <= 8, at: Box2D_v2.2.1/Box2D/Collision/Shapes/b2PolygonShape.cpp,122,void b2PolygonShape::Set(const b2Vec2 *, int32) at Error
        at Error (native)
        at x.___assert_func (http://localhost:5004/Physics_behavior.js:233:28)
        at dc (http://localhost:5004/Physics_behavior.js:213:73440)
        at nQ (http://localhost:5004/Physics_behavior.js:214:142833)
        at Q.Set (http://localhost:5004/Physics_behavior.js:482:367)
        at createPolygonShape (http://localhost:5004/Physics_behavior.js:568:11)
        at behinstProto.createBody (http://localhost:5004/Physics_behavior.js:1469:24)
        at behinstProto.postCreate (http://localhost:5004/Physics_behavior.js:1083:8)
        at Runtime.createInstanceFromInit (http://localhost:5004/preview.js:2964:28)
        at Layer.createInitialInstances (http://localhost:5004/layout.js:1363:25)[/code:h0c7bjiz]
    
    This Happened on Node Webkit and Google Chrome, on firefox the screen freezes and nothing more happens. I've disabled all the Physics, and when i want to use an object with physics on my project I get this.
    Thanks in Advance.
  • I think this has to do with having more than 8 collision points when using Box2d asm ( see https://www.scirra.com/forum/r173_p796179?#p796179 from Ashley).

  • Make sure that none of the collision points overlap to produce an invalid collision shape.

    [attachment=0:2v5iocqb][/attachment:2v5iocqb]

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey, thanks I've checked up and it's a bug on r185 Beta, I'm not using asm.js to make the physics simulation. Only Box2d, also none of my collision points are wrong, I've put all on bounding box and the error it's fixed, but since I'm using more than 8 collision points I stopped using asm.js... Well when I Change on the project properties the physics engine It seems that it doesn't change at all, so the engine is using asm.js even if on the project properties bar I change the value to "box2d".

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)