-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore gravity is not working for matter physics #6473
Comments
Hello , i looked for the solution online in order To apply your fix, you can create a custom plugin for Phaser 3 that patches the Engine._bodiesApplyGravity method with the corrected version. Here's what i found : Create a new file called MatterGravityFixPlugin.js: export class MatterGravityFixPlugin extends Phaser.Plugins.ScenePlugin {
} const config = { |
this line fails to pass tslint in my environment... any idea why Matter.Matter wouldn't ? I have to force the following:
That being said, great fix. Thanks! |
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the |
Version
Description
The boolean property ignoreGravity on matter MatterJS.BodyType is not working anymore since release 3.60.0.
Although it is set to true, the body is affected by gravity.
Example Test Code
export class Bullet extends Phaser.Physics.Matter.Sprite {
constructor(...) {
super(...);
...
this.setIgnoreGravity(true);
...
}
}
Additional Information
The evaluation of the flag is missing in method Engine._bodiesApplyGravity.
This should be the correct code for this method, as it was before.
Also without typos in the jsdoc :)
The text was updated successfully, but these errors were encountered: