cocos2d-js: what is the best way to have a fixed joint between two bodies with box2d?
By : Gia
Date : March 29 2020, 07:55 AM
wish helps you I'm searching for a way to have a fixed joint between two bodies. I tried b2DistanceJointDef but it would still rotate. Use a constraint here? If so how? , I solved it using b2WeldJoint: code :
var jointDef = new b2WeldJointDef();
jointDef.referenceAngle = 0.0;
jointDef.collideConnected = false;
jointDef.bodyA = body;
jointDef.bodyB = lastBody;
jointDef.localAnchorA = body.tileOffset;
jointDef.localAnchorB = lastBody.tileOffset;
var joint = this.world.CreateJoint(jointDef);
|
tint sprite on mobile disables sprite state change with phaser
By : user2257105
Date : March 29 2020, 07:55 AM
To fix this issue Yes this is a known Pixi bug I'm afraid. We're working on a fix for it, but it's likely to not drop for a couple of weeks yet. Please keep an eye on the Pixi / Phaser repos and you should see it resolved by the end of Sept. 2014. The reason you only notice it on mobile is because it only happens in Canvas mode (which mobile uses), in WebGL the tint is applied correctly to each frame of the animation. In Canvas it doesn't update the tint cache correctly when the animation frame changes.
|
Non-rectangular crop Phaser.Sprite or Phaser.Image
By : Lalit Sarna
Date : March 29 2020, 07:55 AM
it fixes the issue Try to use alpha mask like hereBut in this case you need upload an image of mask (your polygon).
|
Phaser applying physics to child class of Phaser.Sprite (ES6)
By : kanthan
Date : March 29 2020, 07:55 AM
wish of those help My Bad The code is actually working, it was due to another setting "fixedToCamera = true"
|
Bodies connected by a joint must be added to the same CCPhysicsNode, however two bodies are under the same CCPhysicsNode
By : Erystasius
Date : March 29 2020, 07:55 AM
To fix this issue I had the same problem, it turns out I had not enabled physics on the _mouseNode. Enabling physics on the node solved the problem.
|