@milk-ecs/rapier
v1.0.24
Published
<div align="center">
Downloads
24
Readme
Milk + PhysX
📦 PhysX Package for Milk.
🔧 Getting started
import { setupPhysx, PhysXPhysicsSystem, PhysXBody, PhysXBox } from '@milk-ecs/physx';
// Ensure to run `setupPhysx` before starting the engine (loads WASM)
setupPhysx().then(() => {
new Engine();
});
// Add the PhysX system
engine.addSystem(new PhysXPhysicsSystem());
// Creating a simple box
const entity = new Entity();
entity.add(Transform);
entity.add(PhysXBody);
entity.add(PhysXBox, {
size: Vector3.Equal(1 / 2)
});
🔎 Using PhysX Debugger
- Use the Profile build of PhysX
setupPhysx('profile')
- Enable debugger in the system
new PhysXPhysicsSystem(gravity, 1, true)
(also reccomend using a low substep) - Create a Websocket -> TCP proxy via
websockify 8090 127.0.0.1:5425