public JiggleGame() { graphics = new GraphicsDeviceManager(this); content = new ContentManager(Services); graphics.SynchronizeWithVerticalRetrace = true; this.IsFixedTimeStep = true; physicSystem = new PhysicsSystem(); graphics.SynchronizeWithVerticalRetrace = false; this.IsFixedTimeStep = false; //physicSystem.CollisionSystem = new CollisionSystemGrid(32, 32, 32, 30, 30, 30); //physicSystem.CollisionSystem = new CollisionSystemBrute(); physicSystem.CollisionSystem = new CollisionSystemSAP(); physicSystem.EnableFreezing = true; physicSystem.SolverType = PhysicsSystem.Solver.Normal; physicSystem.CollisionSystem.UseSweepTests = true; physicSystem.NumCollisionIterations = 10; physicSystem.NumContactIterations = 10; physicSystem.NumPenetrationRelaxtionTimesteps = 15; camera = new Camera(this); FrameRateCounter physStats = new FrameRateCounter(this, this.physicSystem); debugDrawer = new DebugDrawer(this); debugDrawer.Enabled = false; Components.Add(physStats); Components.Add(camera); Components.Add(debugDrawer); physStats.DrawOrder = 2; debugDrawer.DrawOrder = 3; this.IsMouseVisible = true; this.Window.Title = "JigLibX Physic Library " + System.Reflection.Assembly.GetAssembly(typeof(PhysicsSystem)).GetName().Version.ToString(); }
public JiggleGame() { graphics = new GraphicsDeviceManager(this); content = new ContentManager(Services); graphics.SynchronizeWithVerticalRetrace = true; this.IsFixedTimeStep = true; physicSystem = new PhysicsSystem(); graphics.SynchronizeWithVerticalRetrace = false; this.IsFixedTimeStep = false; //physicSystem.CollisionSystem = new CollisionSystemGrid(32, 32, 32, 30, 30, 30); //physicSystem.CollisionSystem = new CollisionSystemBrute(); physicSystem.CollisionSystem = new CollisionSystemSAP(); physicSystem.EnableFreezing = true; physicSystem.SolverType = PhysicsSystem.Solver.Normal; physicSystem.CollisionSystem.UseSweepTests = true; physicSystem.NumCollisionIterations = 8; physicSystem.NumContactIterations = 8; physicSystem.NumPenetrationRelaxtionTimesteps = 15; camera = new Camera(this); FrameRateCounter physStats = new FrameRateCounter(this, this.physicSystem); debugDrawer = new DebugDrawer(this); debugDrawer.Enabled = false; Components.Add(physStats); Components.Add(camera); Components.Add(debugDrawer); physStats.DrawOrder = 2; debugDrawer.DrawOrder = 3; this.IsMouseVisible = true; this.Window.Title = "JigLibX Physic Library " + System.Reflection.Assembly.GetAssembly(typeof(PhysicsSystem)).GetName().Version.ToString(); }