Revert last checkin. Avatars fall through non-physical prims now.

There is more to the solution then just enabling soft_erp and 
soft_cfm for all d.Contact cases.
0.6.0-stable
Charles Krinke 2008-11-01 17:58:34 +00:00
parent 1e376deedd
commit 9299be0080
1 changed files with 7 additions and 12 deletions

View File

@ -386,12 +386,9 @@ namespace OpenSim.Region.Physics.OdePlugin
staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)]; staticPrimspace = new IntPtr[(int)(300 / metersInSpace), (int)(300 / metersInSpace)];
// General contact friction, bounce and other parameters // Centeral contact friction and bounce
contact.surface.mode |= (d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM);
contact.surface.mu = nmAvatarObjectContactFriction; contact.surface.mu = nmAvatarObjectContactFriction;
contact.surface.bounce = nmAvatarObjectContactBounce; 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 // Terrain contact friction and Bounce
// This is the *non* moving version. Use this when an avatar // This is the *non* moving version. Use this when an avatar
@ -401,6 +398,12 @@ namespace OpenSim.Region.Physics.OdePlugin
TerrainContact.surface.bounce = nmTerrainContactBounce; TerrainContact.surface.bounce = nmTerrainContactBounce;
TerrainContact.surface.soft_erp = nmTerrainContactERP; 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 // Prim contact friction and bounce
// THis is the *non* moving version of friction and bounce // THis is the *non* moving version of friction and bounce
// Use this when an avatar comes in contact with a prim // Use this when an avatar comes in contact with a prim
@ -415,14 +418,6 @@ namespace OpenSim.Region.Physics.OdePlugin
AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce; AvatarMovementTerrainContact.surface.bounce = mTerrainContactBounce;
AvatarMovementTerrainContact.surface.soft_erp = mTerrainContactERP; 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); d.HashSpaceSetLevels(space, worldHashspaceLow, worldHashspaceHigh);
// Set the gravity,, don't disable things automatically (we set it explicitly on some things) // Set the gravity,, don't disable things automatically (we set it explicitly on some things)