feat: remove from physics when dying

This commit is contained in:
cha0s 2019-04-19 17:57:20 -05:00
parent 6414f2db27
commit e56cad0ad1

View File

@ -89,6 +89,10 @@ export class Physical extends decorate(Trait) {
}
},
dying: () => {
this.entity.addedToPhysics = false;
},
positionChanged: () => {
if (this._body) {
const position = this.entity.position;