fix: body guards
This commit is contained in:
parent
e479128901
commit
8c1e8d8c1a
|
@ -108,13 +108,13 @@ export class Physical extends decorate(Trait) {
|
|||
return {
|
||||
|
||||
applyForce: (force) => {
|
||||
if (this._world) {
|
||||
if (this._world && this._body) {
|
||||
this._body.applyForce(force);
|
||||
}
|
||||
},
|
||||
|
||||
applyImpulse: (impulse, elapsed) => {
|
||||
if (this._world) {
|
||||
if (this._world && this._body) {
|
||||
this._body.applyImpulse(impulse, elapsed);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user