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

Discussion and feedback on Construct 2

Post » Tue Oct 21, 2014 4:31 am

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:
Code: Select all
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)


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.
B
9
S
2
Posts: 27
Reputation: 959

Post » Tue Oct 21, 2014 7:14 am

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).
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,556
Reputation: 60,456

Post » Tue Oct 21, 2014 7:56 am

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

cp.JPG
You do not have the required permissions to view the files attached to this post.
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Tue Oct 21, 2014 4:17 pm

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".
B
9
S
2
Posts: 27
Reputation: 959


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests