public BulletXmlImportDemoSimulation() { CollisionConfiguration = new DefaultCollisionConfiguration(); Dispatcher = new CollisionDispatcher(CollisionConfiguration); Broadphase = new DbvtBroadphase(); World = new DiscreteDynamicsWorld(Dispatcher, Broadphase, null, CollisionConfiguration); _importer = new BulletXmlWorldImporter(World); if (!_importer.LoadFile(Path.Combine("data", "bullet_basic.xml"))) { //throw new FileNotFoundException(); } }
protected override void OnInitializePhysics() { // collision configuration contains default setup for memory, collision setup CollisionConf = new DefaultCollisionConfiguration(); Dispatcher = new CollisionDispatcher(CollisionConf); Broadphase = new DbvtBroadphase(); Solver = new SequentialImpulseConstraintSolver(); World = new DiscreteDynamicsWorld(Dispatcher, Broadphase, Solver, CollisionConf); World.Gravity = new Vector3(0, -10, 0); importer = new BulletXmlWorldImporter(World); if (!importer.LoadFile(Path.Combine("data", "bullet_basic.xml"))) { //throw new FileNotFoundException(); } }