public Physics2dEngine() { phsEngine = new PhysicsEngine(); phsEngine.BroadPhase = new Physics2DDotNet.Detectors.SelectiveSweepDetector(); //phsEngine.BroadPhase = new Physics2DDotNet.Detectors.SpatialHashDetector(); SequentialImpulsesSolver phsSolver = new SequentialImpulsesSolver(); phsSolver.Iterations = 12; phsSolver.SplitImpulse = true; //phsSolver.BiasFactor = 0.7; phsSolver.BiasFactor = 0.0; //phsSolver.AllowedPenetration = 0.1; phsSolver.AllowedPenetration = 0.01; phsEngine.Solver = (CollisionSolver)phsSolver; }
/// <summary> /// Raises the <see cref="E:Added"/> event. /// </summary> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected override void OnAdded(EventArgs e) { solver = (SequentialImpulsesSolver)Engine.Solver; base.OnAdded(e); }