2 fixed bodies won't do anything

This commit is contained in:
Richard Davey 2017-08-17 04:06:08 +01:00
parent 100f4fc013
commit e36cc68044

View file

@ -268,6 +268,12 @@ var World = new Class({
checkBodies: function (bodyA, bodyB)
{
// 2 fixed bodies won't do anything
if (bodyA.collides === COLLIDES.FIXED && bodyB.collides === COLLIDES.FIXED)
{
return;
}
// bitwise checks
if (bodyA.checkAgainst & bodyB.type)
{