Files
cocos4/cocos/3d/framework/physics/physics-system.ts
T
Leslie Leigh cf180d57d9 do not run phy system in editor;support center of phy shape;fix setWorldPosition() bug (#3690)
* * do not run phy system in editor
* support center of phy shape
* fix setWorldPosition() bug

* add interface pullTransform() for sync dynamic phy body's transform
2019-01-02 16:51:01 +08:00

20 lines
365 B
TypeScript

import { PhysicsWorld } from './world';
export class PhysicsSystem {
private _world: PhysicsWorld;
constructor() {
this._world = new PhysicsWorld();
}
public update(deltaTime: number) {
if (CC_EDITOR) {
return;
}
this._world.step(deltaTime);
}
get world() {
return this._world;
}
}