From dfc12d591c0a23a189826db482bb9215018a61ec Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 22 Oct 2008 01:52:12 +0000 Subject: [PATCH] * Add a config option for filtering collisions. Sometimes, under load, this seems to cause bouncing on really thin flat prim. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 5 +++++ bin/OpenSim.ini.example | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 04d2ea934e..a782e2dc64 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -195,6 +195,7 @@ namespace OpenSim.Region.Physics.OdePlugin private float[] _heightmap; private float[] _watermap; + private bool m_filterCollisions = true; // private float[] _origheightmap; @@ -360,6 +361,7 @@ namespace OpenSim.Region.Physics.OdePlugin meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true); meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f); MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f); + m_filterCollisions = physicsconfig.GetBoolean("filter_collisions", true); if (Environment.OSVersion.Platform == PlatformID.Unix) { @@ -847,6 +849,9 @@ namespace OpenSim.Region.Physics.OdePlugin { bool result = false; //return result; + if (!m_filterCollisions) + return false; + ActorTypes at = (ActorTypes)atype; lock (_perloopContact) { diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 6315d28e3f..f71fa65dc3 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -240,6 +240,11 @@ small_hashspace_size_high = 66 ; surface layer around geometries other geometries can sink into before generating a contact world_contact_surface_layer = 0.001 +; Filtering Collisions helps keep things stable physics wise, but sometimes +; it can be over zealous. If you notice bouncing, chances are it's being just +; that +filter_collisions = true + ; Non Moving Terrain Contact (avatar isn't moving) nm_terraincontact_friction = 255.0 nm_terraincontact_bounce = 0.1