Files
cocos4/cocos/physics/framework/physics-selector.ts
T
jiaxin.lai aa0eb1bdaf cylinder collider (#6416)
* stash

* stash

* stash

* stash

* fix z direction

* impl cannon cylinder

* stash

* stash

* stash

* fix memory leak

* update @cocos/ammo

* add error map

* update package-lock

* tweaks
2020-03-25 18:35:27 +08:00

32 lines
722 B
TypeScript

/**
* @hidden
*/
export let PhysicsWorld: any;
export let RigidBody: any;
export let BoxShape: any;
export let SphereShape: any;
export let CapsuleShape: any;
export let TrimeshShape: any;
export let CylinderShape: any;
export interface IPhysicsWrapperObject {
world: any,
body?: any,
box: any,
sphere: any,
capsule?: any,
trimesh?: any,
cylinder?: any,
}
export function instantiate (obj: IPhysicsWrapperObject) {
BoxShape = obj.box;
SphereShape = obj.sphere;
RigidBody = obj.body;
PhysicsWorld = obj.world;
if (obj.capsule) { CapsuleShape = obj.capsule; }
if (obj.trimesh) { TrimeshShape = obj.trimesh; }
if (obj.cylinder) { CylinderShape = obj.cylinder; }
}