Page 1 of 1

Kinematic and Dynamic penetration?

Posted: Sat May 11, 2013 4:49 am
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.

Re: Kinematic and Dynamic penetration?

Posted: Sat May 11, 2013 7:34 pm
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.

Re: Kinematic and Dynamic penetration?

Posted: Sun May 12, 2013 12:38 am
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.