mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
* Tuned the llMove2Target PID controller to be more reasonable and not overshoot the target.
This commit is contained in:
@@ -130,6 +130,14 @@ namespace OpenSim.Region.Physics.Manager
|
||||
return (float) Math.Sqrt(X*X + Y*Y + Z*Z);
|
||||
}
|
||||
|
||||
public static float GetDistanceTo(PhysicsVector a, PhysicsVector b)
|
||||
{
|
||||
float dx = a.X - b.X;
|
||||
float dy = a.Y - b.Y;
|
||||
float dz = a.Z - b.Z;
|
||||
return (float) Math.Sqrt(dx * dx + dy * dy + dz * dz);
|
||||
}
|
||||
|
||||
public static PhysicsVector operator /(PhysicsVector v, float f)
|
||||
{
|
||||
return new PhysicsVector(v.X/f, v.Y/f, v.Z/f);
|
||||
@@ -154,5 +162,6 @@ namespace OpenSim.Region.Physics.Manager
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user