asddad
This commit is contained in:
parent
fd8964e58b
commit
94897a06a3
|
@ -46,7 +46,7 @@ public class Game1 : Game
|
|||
|
||||
protected override void LoadContent()
|
||||
{
|
||||
engine = new PhysicsEngine2D();
|
||||
engine = new PhysicsEngine2D() { IterationCount = 100 };
|
||||
_spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||
|
||||
spriteBox = new Sprite() { Texture2D = Content.Load<Texture2D>("Sprites/Pixel") };
|
||||
|
|
|
@ -54,13 +54,8 @@ public class PhysicsEngine2D : IPhysicsEngine2D
|
|||
|
||||
for (int i = colliders.Count - 1; i >= 0; i--)
|
||||
CheckCollisions(colliders[i], colliders, (collider1, collider2, collisionVertex) =>
|
||||
{
|
||||
ResolveCollision(collider1, collider2, collisionVertex, intervalDeltaTime);
|
||||
// ResolveCollision(collider2, collider1, collisionVertex, intervalDeltaTime);
|
||||
|
||||
// collider1.Recalculate();
|
||||
// collider2.Recalculate();
|
||||
});
|
||||
ResolveCollision(collider1, collider2, collisionVertex, intervalDeltaTime)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue