ubitODE - retouch character PIDs

avinationmerge
UbitUmarov 2012-04-18 03:02:28 +01:00
parent 9464fcebcd
commit 7f42069295
1 changed files with 4 additions and 4 deletions

View File

@ -683,7 +683,7 @@ namespace OpenSim.Region.Physics.OdePlugin
PID_D *= m_mass / _parent_scene.ODE_STEPSIZE; PID_D *= m_mass / _parent_scene.ODE_STEPSIZE;
PID_P /= 50 * 80; PID_P /= 50 * 80;
PID_P *= m_mass / _parent_scene.ODE_STEPSIZE; PID_P *= m_mass / _parent_scene.ODE_STEPSIZE;
Body = d.BodyCreate(_parent_scene.world); Body = d.BodyCreate(_parent_scene.world);
d.BodySetAutoDisableFlag(Body, false); d.BodySetAutoDisableFlag(Body, false);
@ -862,10 +862,10 @@ namespace OpenSim.Region.Physics.OdePlugin
float depth = terrainheight - chrminZ; float depth = terrainheight - chrminZ;
if (!flying) if (!flying)
{ {
vec.Z = -vel.Z * PID_D * 1.5f + depth * PID_P * 30; vec.Z = -vel.Z * PID_D * 3f + depth * PID_P * 60;
} }
else else
vec.Z = depth * PID_P * 30; vec.Z = depth * PID_P * 60;
if (depth < 0.1f) if (depth < 0.1f)
{ {
@ -1171,7 +1171,7 @@ namespace OpenSim.Region.Physics.OdePlugin
CAPSULE_LENGTH = caplen; CAPSULE_LENGTH = caplen;
AvatarGeomAndBodyCreation(_position.X, _position.Y, AvatarGeomAndBodyCreation(_position.X, _position.Y,
_position.Z + (Math.Abs(CAPSULE_LENGTH - prevCapsule) * 2)); _position.Z + (CAPSULE_LENGTH - prevCapsule) * 0.5f);
Velocity = Vector3.Zero; Velocity = Vector3.Zero;