Kinematic and Dynamic penetration?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
needshelprendering
Posts: 25
Joined: Mon Sep 17, 2012 1:17 am

Kinematic and Dynamic penetration?

Post by needshelprendering »

Hi Norbo,
I recently decided to switch from my own graphics setup to one which already has working shadows and point lights, as well as a few other odds and ends. I chose to try out XNA FINAL ENGINE (found here) as it already has BEPU implemented.

I integrated the character controller and grabber from your demo and began playing with the small scene they have setup with a cube wall. While moving a kinematic entity into the cube wall something weird happens, the cubes don't react the way you would expect. First of all, there is a large degree of penetration between objects. Second, objects don't tip or fall when they should.

As far as the penetration goes, I tried changing the follow:

Code: Select all

BEPUphysics.Settings.CollisionDetectionSettings.DefaultMargin = .004f;
BEPUphysics.Settings.CollisionDetectionSettings.AllowedPenetration = .005f;
Nothing seemed to change. I chalked that up to it being due to one of the entities being kinematic, but, dynamic entities do the same thing. The penetration is still too large, even with those settings changed:
Image

For the second problem, I have no idea where to start looking, so I'll just post a photo of it. Hopefully you'll know what the problem is.
Before:
Image
After, I am sure the cubes should have fallen:
Image

I asked on Final Engine's codeplex, but I was told he did not really know and that he would ask the guy in charge of the physics integration.

Thanks for all your help.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Kinematic and Dynamic penetration?

Post by Norbo »

With regards to the penetration, I'd guess that the kinematic is being teleported by setting the Position. That prevents proper collision response from occurring since there's no velocity available to solve with. For proper collision response, entities should be moved with forces/velocities.

The rest seems to indicate a deactivation bug. Such a bug was fixed on March 13, 2012; if an old version of BEPUphysics is being used, that might help explain what you're seeing. In that case, try to update to the latest version.
needshelprendering
Posts: 25
Joined: Mon Sep 17, 2012 1:17 am

Re: Kinematic and Dynamic penetration?

Post by needshelprendering »

Norbo wrote:With regards to the penetration, I'd guess that the kinematic is being teleported by setting the Position. That prevents proper collision response from occurring since there's no velocity available to solve with. For proper collision response, entities should be moved with forces/velocities.

The rest seems to indicate a deactivation bug. Such a bug was fixed on March 13, 2012; if an old version of BEPUphysics is being used, that might help explain what you're seeing. In that case, try to update to the latest version.
That seems to have worked, yeah. Blocks no longer act like they are glued together. Thanks again Norbo.
Post Reply