SOLVED Sphere vs. Terrain collision not happening
Posted: Tue Feb 25, 2014 3:34 pm
Hello Norbo.
I have following space setup:
I'm creating sphere entity and applying impulse with about 300 magnitude.
I'm setting sphere collision rule personal to "NoSolver" - in this particular case I want contacts managed by the engine but provide my own solver.
Everything works fine except that sometimes sphere not triggering collision with terrain - there is no particular pattern when it happens. I tried switching on "ImproveBoundaryBehavior" but no luck.
I'm checking collisions in sphere's ContactCreated event - it works perfectly fine for all objects - goes through them and triggering event, but not for the terrain sometimes.
What I'm possible doing wrong here?
Thanks,
S.
I have following space setup:
Code: Select all
this.space.ForceUpdater.Gravity = new BEPUutilities.Vector3(0, -9.81f, 0f);
Bpp.Settings.MotionSettings.DefaultPositionUpdateMode = Bpp.PositionUpdating.PositionUpdateMode.Continuous;
this.space.Solver.IterationLimit = 10;
Bpp.CollisionTests.CollisionAlgorithms.GeneralConvexPairTester.UseSimplexCaching = false;
Bpp.Settings.MotionSettings.UseExtraExpansionForContinuousBoundingBoxes = false;
Bpp.Settings.CollisionResponseSettings.MaximumPenetrationRecoverySpeed = 2;
Bpp.Settings.CollisionResponseSettings.BouncinessVelocityThreshold = 1;
Bpp.Settings.CollisionResponseSettings.StaticFrictionVelocityThreshold = .2f;
Bpp.Settings.CollisionDetectionSettings.ContactInvalidationLength = .1f;
Bpp.Settings.CollisionDetectionSettings.ContactMinimumSeparationDistance = .1f;
Bpp.Settings.CollisionDetectionSettings.MaximumContactDistance = .1f;
Bpp.Settings.CollisionDetectionSettings.DefaultMargin = .04f;
Bpp.Settings.CollisionDetectionSettings.AllowedPenetration = .01f;
I'm setting sphere collision rule personal to "NoSolver" - in this particular case I want contacts managed by the engine but provide my own solver.
Everything works fine except that sometimes sphere not triggering collision with terrain - there is no particular pattern when it happens. I tried switching on "ImproveBoundaryBehavior" but no luck.
I'm checking collisions in sphere's ContactCreated event - it works perfectly fine for all objects - goes through them and triggering event, but not for the terrain sometimes.
What I'm possible doing wrong here?
Thanks,
S.