fixed bodies scaling
This commit is contained in:
@@ -201,6 +201,10 @@ export default {
|
||||
this.scale = this.concernement.opened ? 5 : 1;
|
||||
|
||||
if (this.scale !== this.oldScale) {
|
||||
// https://github.com/liabru/matter-js/issues/986#issuecomment-812488873
|
||||
// revert to the original size (by reverting the previous scale)
|
||||
Matter.Body.scale(this.body, 1 / this.oldScale, 1 / this.oldScale)
|
||||
// then scale again
|
||||
Matter.Body.scale(this.body, this.scale, this.scale)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user