Skip to content

Commit

Permalink
fix PhysX Physics costs some time even there is not physics node in s…
Browse files Browse the repository at this point in the history
…cene cocos#11382 (cocos#11396)

Co-authored-by: zhanling <[email protected]>
  • Loading branch information
lealzhan and zhanling authored Jun 8, 2022
1 parent 549108d commit 47d1138
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cocos/physics/physx/physx-world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class PhysXWorld extends PhysXInstance implements IPhysicsWorld {
}

step (deltaTime: number, _timeSinceLastCalled?: number, _maxSubStep = 0): void {
if (this.wrappedBodies.length === 0) return;
this._simulate(deltaTime);
if (!PX.MULTI_THREAD) {
this._fetchResults();
Expand Down

0 comments on commit 47d1138

Please sign in to comment.