feat: remove from physics when dying
This commit is contained in:
parent
6414f2db27
commit
e56cad0ad1
|
@ -89,6 +89,10 @@ export class Physical extends decorate(Trait) {
|
|||
}
|
||||
},
|
||||
|
||||
dying: () => {
|
||||
this.entity.addedToPhysics = false;
|
||||
},
|
||||
|
||||
positionChanged: () => {
|
||||
if (this._body) {
|
||||
const position = this.entity.position;
|
||||
|
|
Loading…
Reference in New Issue
Block a user