diff options
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs index d0b4546..dcd02e2 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs | |||
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
153 | if (m_linearFrictionTimescale.Z < timestep) m_linearFrictionTimescale.Z = timestep; | 153 | if (m_linearFrictionTimescale.Z < timestep) m_linearFrictionTimescale.Z = timestep; |
154 | 154 | ||
155 | m_linearMotorDecayTimescale = vd.m_linearMotorDecayTimescale; | 155 | m_linearMotorDecayTimescale = vd.m_linearMotorDecayTimescale; |
156 | if (m_linearMotorDecayTimescale < 0.5f) m_linearMotorDecayTimescale = 0.5f; | 156 | if (m_linearMotorDecayTimescale < timestep) m_linearMotorDecayTimescale = timestep; |
157 | m_linearMotorDecayTimescale *= invtimestep; | 157 | m_linearMotorDecayTimescale *= invtimestep; |
158 | 158 | ||
159 | m_linearMotorTimescale = vd.m_linearMotorTimescale; | 159 | m_linearMotorTimescale = vd.m_linearMotorTimescale; |
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
168 | if (m_angularMotorTimescale < timestep) m_angularMotorTimescale = timestep; | 168 | if (m_angularMotorTimescale < timestep) m_angularMotorTimescale = timestep; |
169 | 169 | ||
170 | m_angularMotorDecayTimescale = vd.m_angularMotorDecayTimescale; | 170 | m_angularMotorDecayTimescale = vd.m_angularMotorDecayTimescale; |
171 | if (m_angularMotorDecayTimescale < 0.5f) m_angularMotorDecayTimescale = 0.5f; | 171 | if (m_angularMotorDecayTimescale < timestep) m_angularMotorDecayTimescale = timestep; |
172 | m_angularMotorDecayTimescale *= invtimestep; | 172 | m_angularMotorDecayTimescale *= invtimestep; |
173 | 173 | ||
174 | m_angularFrictionTimescale = vd.m_angularFrictionTimescale; | 174 | m_angularFrictionTimescale = vd.m_angularFrictionTimescale; |
@@ -230,9 +230,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
230 | m_angularDeflectionTimescale = pValue; | 230 | m_angularDeflectionTimescale = pValue; |
231 | break; | 231 | break; |
232 | case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE: | 232 | case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE: |
233 | // if (pValue < timestep) pValue = timestep; | 233 | if (pValue < timestep) pValue = timestep; |
234 | // try to make impulses to work a bit better | 234 | // try to make impulses to work a bit better |
235 | if (pValue < 0.5f) pValue = 0.5f; | 235 | // if (pValue < 0.5f) pValue = 0.5f; |
236 | else if (pValue > 120) pValue = 120; | 236 | else if (pValue > 120) pValue = 120; |
237 | m_angularMotorDecayTimescale = pValue * invtimestep; | 237 | m_angularMotorDecayTimescale = pValue * invtimestep; |
238 | break; | 238 | break; |
@@ -281,9 +281,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
281 | m_linearDeflectionTimescale = pValue; | 281 | m_linearDeflectionTimescale = pValue; |
282 | break; | 282 | break; |
283 | case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE: | 283 | case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE: |
284 | // if (pValue < timestep) pValue = timestep; | 284 | if (pValue < timestep) pValue = timestep; |
285 | // try to make impulses to work a bit better | 285 | // try to make impulses to work a bit better |
286 | if (pValue < 0.5f) pValue = 0.5f; | 286 | //if (pValue < 0.5f) pValue = 0.5f; |
287 | else if (pValue > 120) pValue = 120; | 287 | else if (pValue > 120) pValue = 120; |
288 | m_linearMotorDecayTimescale = pValue * invtimestep; | 288 | m_linearMotorDecayTimescale = pValue * invtimestep; |
289 | break; | 289 | break; |
@@ -444,9 +444,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
444 | m_linearFrictionTimescale = new Vector3(1000, 1000, 1000); | 444 | m_linearFrictionTimescale = new Vector3(1000, 1000, 1000); |
445 | m_angularFrictionTimescale = new Vector3(1000, 1000, 1000); | 445 | m_angularFrictionTimescale = new Vector3(1000, 1000, 1000); |
446 | m_linearMotorTimescale = 1000; | 446 | m_linearMotorTimescale = 1000; |
447 | m_linearMotorDecayTimescale = 120; | 447 | m_linearMotorDecayTimescale = 120 * invtimestep; |
448 | m_angularMotorTimescale = 1000; | 448 | m_angularMotorTimescale = 1000; |
449 | m_angularMotorDecayTimescale = 1000; | 449 | m_angularMotorDecayTimescale = 1000 * invtimestep; |
450 | m_VhoverHeight = 0; | 450 | m_VhoverHeight = 0; |
451 | m_VhoverEfficiency = 1; | 451 | m_VhoverEfficiency = 1; |
452 | m_VhoverTimescale = 1000; | 452 | m_VhoverTimescale = 1000; |
@@ -901,7 +901,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
901 | GetRollPitch(irotq, out roll, out pitch); | 901 | GetRollPitch(irotq, out roll, out pitch); |
902 | 902 | ||
903 | float ftmp = 1.0f / m_verticalAttractionTimescale / m_verticalAttractionTimescale / _pParentScene.ODE_STEPSIZE; | 903 | float ftmp = 1.0f / m_verticalAttractionTimescale / m_verticalAttractionTimescale / _pParentScene.ODE_STEPSIZE; |
904 | float ftmp2 = m_verticalAttractionEfficiency / _pParentScene.ODE_STEPSIZE; | 904 | float ftmp2; |
905 | if (m_bankingEfficiency == 0) | ||
906 | ftmp2 = m_verticalAttractionEfficiency / _pParentScene.ODE_STEPSIZE; | ||
907 | else | ||
908 | ftmp2 = 0; | ||
905 | 909 | ||
906 | if (roll > halfpi) | 910 | if (roll > halfpi) |
907 | roll = pi - roll; | 911 | roll = pi - roll; |