aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-15 23:11:31 +0000
committerTeravus Ovares2008-05-15 23:11:31 +0000
commitafd5da6851f30945c86d8cd950879582fdf82a62 (patch)
tree64be548ff2e1a335b8d32d435f9ed6fad7497a9e /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
parentfixed the key issue that caused appearance to go wonky (diff)
downloadopensim-SC_OLD-afd5da6851f30945c86d8cd950879582fdf82a62.zip
opensim-SC_OLD-afd5da6851f30945c86d8cd950879582fdf82a62.tar.gz
opensim-SC_OLD-afd5da6851f30945c86d8cd950879582fdf82a62.tar.bz2
opensim-SC_OLD-afd5da6851f30945c86d8cd950879582fdf82a62.tar.xz
* Adds various tweakable avatar control options to the OpenSim.ini.example.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs47
1 files changed, 46 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 873abc7..d795e45 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -166,6 +166,16 @@ namespace OpenSim.Region.Physics.OdePlugin
166 private float mAvatarObjectContactBounce = 0.1f; 166 private float mAvatarObjectContactBounce = 0.1f;
167 167
168 168
169 private float avPIDD = 3200f;
170 private float avPIDP = 1400f;
171 private float avCapRadius = 0.37f;
172 private float avStandupTensor = 2000000f;
173 private float avDensity = 80f;
174 private float avHeightFudgeFactor = 0.52f;
175 private float avMovementDivisorWalk = 1.3f;
176 private float avMovementDivisorRun = 0.8f;
177
178
169 private float[] _heightmap; 179 private float[] _heightmap;
170 180
171 private float[] _watermap; 181 private float[] _watermap;
@@ -271,6 +281,21 @@ namespace OpenSim.Region.Physics.OdePlugin
271 { 281 {
272 mesher = meshmerizer; 282 mesher = meshmerizer;
273 m_config = config; 283 m_config = config;
284 // Defaults
285
286 if (Environment.OSVersion.Platform == PlatformID.Unix)
287 {
288 avPIDD = 3200.0f;
289 avPIDP = 1400.0f;
290 avStandupTensor = 2000000f;
291 }
292 else
293 {
294 avPIDD = 2200.0f;
295 avPIDP = 900.0f;
296 avStandupTensor = 550000f;
297 }
298
274 if (m_config != null) 299 if (m_config != null)
275 { 300 {
276 IConfig physicsconfig = m_config.Configs["ODEPhysicsSettings"]; 301 IConfig physicsconfig = m_config.Configs["ODEPhysicsSettings"];
@@ -306,6 +331,26 @@ namespace OpenSim.Region.Physics.OdePlugin
306 ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", 0.020f); 331 ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", 0.020f);
307 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); 332 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);
308 333
334 avDensity = physicsconfig.GetFloat("av_density", 80f);
335 avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f);
336 avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f);
337 avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f);
338 avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f);
339
340 if (Environment.OSVersion.Platform == PlatformID.Unix)
341 {
342 avPIDD = physicsconfig.GetFloat("av_pid_derivative_linux", 3200.0f);
343 avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 1400.0f);
344 avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f);
345 }
346 else
347 {
348 avPIDD = physicsconfig.GetFloat("av_pid_derivative_win", 2200.0f);
349 avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f);
350 avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f);
351 }
352
353
309 } 354 }
310 355
311 } 356 }
@@ -1054,7 +1099,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1054 pos.X = position.X; 1099 pos.X = position.X;
1055 pos.Y = position.Y; 1100 pos.Y = position.Y;
1056 pos.Z = position.Z; 1101 pos.Z = position.Z;
1057 OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size); 1102 OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun);
1058 _characters.Add(newAv); 1103 _characters.Add(newAv);
1059 return newAv; 1104 return newAv;
1060 } 1105 }