mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
The Matter.Body
function scale
has been updated so if the Body originally had an inertia
of Infinity
this will be restored at the end of the call. This happens if you set a Matter Body to have fixed rotation. Fix #6369
This commit is contained in:
parent
425ef3b472
commit
cf27547793
1 changed files with 7 additions and 0 deletions
|
@ -741,6 +741,8 @@ var Axes = require('../geometry/Axes');
|
|||
|
||||
point = point || body.position;
|
||||
|
||||
var wasFixedRotation = (body.inertia === Infinity) ? true : false;
|
||||
|
||||
for (var i = 0; i < body.parts.length; i++) {
|
||||
var part = body.parts[i];
|
||||
|
||||
|
@ -792,6 +794,11 @@ var Axes = require('../geometry/Axes');
|
|||
body.circleRadius = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (wasFixedRotation)
|
||||
{
|
||||
Body.setInertia(body, Infinity);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue