Edited. I did some experimenting and it appears that asm.js is not very good!! When joints are created and played in box2d the joints behave properly. If the physics is changed to asm.js then the joints become a springy and somewhat unpredictable mess - they do not behave correctly.
Attach a Capx
Description of Capx
One layout with 2 types of physics objects. One type is fixed (sprite) and the other is not (sprite2). When you run the layout, a family is used to pick the movable objects and join them together using limited revolute joints. The imagepoint(0) is top left and imagepoint(1) is top right of these objects; the objective is to joint the adjacent top corners of the objects using limited revolute joints. This semi-rigid jointed chain/platform is then attached to an immovable object via a revolute joint on the right so the whole assembly can pivot and rotate/fall anti-clockwise until the left segment strikes a ground object. The movement of that left object is of interest here.
Steps to Reproduce Bug
- Run the layout.
- Run the layout after selecting box2d web physics engine and observe.
In asm.js, when the 3 joined objects rotate down and strike the floor, the left-most object behaves incorrectly in 3 ways:
1. It appears that the joint pivot is in the wrong place.
2. It appears that the joint does not behave like a limited revolute joint because the object's angular range of movement exceeds the desired +/- 3 degrees declared in the event sheet.
3. The motion appears springy - which is incorrect for this type of joint. This could be because the 3 degree limit is being exceeded, even though there is so little stress (ie this point and point 2 are symptoms of the joint being excessively flexible).
NB The joint behaves correctly if box2d web physics engine is selected.
Joints that are created using asm.js physics engine should behave in a similar way to the box2d web joints..
- Chrome: (YES)
- FireFox: (YES)
- Internet Explorer: (YES)
Operating System and Service Pack
Construct 2 Version ID
r210 64 bit