aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorCharles Krinke2008-11-01 17:30:06 +0000
committerCharles Krinke2008-11-01 17:30:06 +0000
commit1e376deedd81f996a94ff168de42b14bb5e6a17f (patch)
tree259582d709a4f2998c606abfb4bf35f338182070 /OpenSim/Region/Physics
parentMake the inventory transfer module replacable in config. (diff)
downloadopensim-SC_OLD-1e376deedd81f996a94ff168de42b14bb5e6a17f.zip
opensim-SC_OLD-1e376deedd81f996a94ff168de42b14bb5e6a17f.tar.gz
opensim-SC_OLD-1e376deedd81f996a94ff168de42b14bb5e6a17f.tar.bz2
opensim-SC_OLD-1e376deedd81f996a94ff168de42b14bb5e6a17f.tar.xz
Added soft_cfm and soft_erp to the general "contact" initialization
for physical prim interactions. They were not previously enabled for prim-prim interactions.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs19
1 files changed, 12 insertions, 7 deletions
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
386 386
387 staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; 387 staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)];
388 388
389 // Centeral contact friction and bounce 389 // General contact friction, bounce and other parameters
390 contact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
390 contact.surface.mu = nmAvatarObjectContactFriction; 391 contact.surface.mu = nmAvatarObjectContactFriction;
391 contact.surface.bounce = nmAvatarObjectContactBounce; 392 contact.surface.bounce = nmAvatarObjectContactBounce;
393 contact.surface.soft_cfm = 0.01f; //ckrinke 11-08
394 contact.surface.soft_erp = 0.010f; //ckrinke 11-08
392 395
393 // Terrain contact friction and Bounce 396 // Terrain contact friction and Bounce
394 // This is the *non* moving version. Use this when an avatar 397 // This is the *non* moving version. Use this when an avatar
@@ -398,12 +401,6 @@ namespace OpenSim.Region.Physics.OdePlugin
398 TerrainContact.surface.bounce = nmTerrainContactBounce; 401 TerrainContact.surface.bounce = nmTerrainContactBounce;
399 TerrainContact.surface.soft_erp = nmTerrainContactERP; 402 TerrainContact.surface.soft_erp = nmTerrainContactERP;
400 403
401 WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
402 WaterContact.surface.mu = 0f; // No friction
403 WaterContact.surface.bounce = 0.0f; // No bounce
404 WaterContact.surface.soft_cfm = 0.01f;
405 WaterContact.surface.soft_erp = 0.010f;
406
407 // Prim contact friction and bounce 404 // Prim contact friction and bounce
408 // THis is the *non* moving version of friction and bounce 405 // THis is the *non* moving version of friction and bounce
409 // Use this when an avatar comes in contact with a prim 406 // Use this when an avatar comes in contact with a prim
@@ -418,6 +415,14 @@ namespace OpenSim.Region.Physics.OdePlugin
418 AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; 415 AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce;
419 AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; 416 AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP;
420 417
418 // And finally, WaterContact parameters. These are the five different d.Contact defined
419 // currently (11-08)
420 WaterContact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
421 WaterContact.surface.mu = 0f; // No friction
422 WaterContact.surface.bounce = 0.0f; // No bounce
423 WaterContact.surface.soft_cfm = 0.01f;
424 WaterContact.surface.soft_erp = 0.010f;
425
421 d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh); 426 d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh);
422 427
423 // Set the gravity,, don't disable things automatically (we set it explicitly on some things) 428 // Set the gravity,, don't disable things automatically (we set it explicitly on some things)