From 1e376deedd81f996a94ff168de42b14bb5e6a17f Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 1 Nov 2008 17:30:06 +0000 Subject: Added soft_cfm and soft_erp to the general "contact" initialization for physical prim interactions. They were not previously enabled for prim-prim interactions. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a782e2d..486f53c 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -386,9 +386,12 @@ namespace OpenSim.Region.Physics.OdePlugin staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; - // Centeral contact friction and bounce + // General contact friction, bounce and other parameters + contact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM); contact.surface.mu = nmAvatarObjectContactFriction; contact.surface.bounce = nmAvatarObjectContactBounce; + contact.surface.soft_cfm = 0.01f; //ckrinke 11-08 + contact.surface.soft_erp = 0.010f; //ckrinke 11-08 // Terrain contact friction and Bounce // This is the *non* moving version. Use this when an avatar @@ -398,12 +401,6 @@ namespace OpenSim.Region.Physics.OdePlugin TerrainContact.surface.bounce = nmTerrainContactBounce; TerrainContact.surface.soft_erp = nmTerrainContactERP; - WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM); - WaterContact.surface.mu = 0f; // No friction - WaterContact.surface.bounce = 0.0f; // No bounce - WaterContact.surface.soft_cfm = 0.01f; - WaterContact.surface.soft_erp = 0.010f; - // Prim contact friction and bounce // THis is the *non* moving version of friction and bounce // Use this when an avatar comes in contact with a prim @@ -418,6 +415,14 @@ namespace OpenSim.Region.Physics.OdePlugin AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; + // And finally, WaterContact parameters. These are the five different d.Contact defined + // currently (11-08) + WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM); + WaterContact.surface.mu = 0f; // No friction + WaterContact.surface.bounce = 0.0f; // No bounce + WaterContact.surface.soft_cfm = 0.01f; + WaterContact.surface.soft_erp = 0.010f; + d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh); // Set the gravity,, don't disable things automatically (we set it explicitly on some things) -- cgit v1.1