Skip to content

Commit

Permalink
feat: opt code
Browse files Browse the repository at this point in the history
  • Loading branch information
luzhuang committed Aug 29, 2023
1 parent 885bc09 commit 8dbd1b5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/core/src/physics/PhysicsManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ICharacterController, ICollider, IPhysics, IPhysicsManager } from "@galacean/engine-design";
import { Ray, Vector3 } from "@galacean/engine-math";
import { Ray, Vector3, MathUtil } from "@galacean/engine-math";
import { DisorderedArray } from "../DisorderedArray";
import { Engine } from "../Engine";
import { Layer } from "../Layer";
Expand Down Expand Up @@ -173,11 +173,7 @@ export class PhysicsManager {
}

set fixedTimeStep(value: number) {
if (value > 0) {
this._fixedTimeStep = value;
} else {
console.warn("fixedTimeStep must be greater than 0.");
}
this._fixedTimeStep = Math.max(value, MathUtil.zeroTolerance);
}

constructor(engine: Engine) {
Expand Down

0 comments on commit 8dbd1b5

Please sign in to comment.