Merge commit '20da04fd0c909a00c0cdc2585f242e95c868801a' into bigmerge

avinationmerge
Melanie 2011-10-25 01:43:05 +01:00
commit 747786aac0
3 changed files with 39 additions and 8 deletions

View File

@ -4812,6 +4812,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
position = presence.OffsetPosition;
velocity = presence.Velocity;
acceleration = Vector3.Zero;
// Interestingly, sending this to non-zero will cause the client's avatar to start moving & accelerating
// in that direction, even though we don't model this on the server. Implementing this in the future
// may improve movement smoothness.
// acceleration = new Vector3(1, 0, 0);
angularVelocity = Vector3.Zero;
rotation = presence.Rotation;

View File

@ -202,10 +202,18 @@ namespace OpenSim.Region.Physics.Manager
public virtual void SetMaterial (int material)
{
}
/// <summary>
/// Position of this actor.
/// </summary>
/// <remarks>
/// Setting this directly moves the actor to a given position.
/// Getting this retrieves the position calculated by physics scene updates, using factors such as velocity and
/// collisions.
/// </remarks>
public abstract Vector3 Position { get; set; }
public abstract float Mass { get; }
public abstract Vector3 Force { get; set; }
@ -215,11 +223,24 @@ namespace OpenSim.Region.Physics.Manager
public abstract void VehicleRotationParam(int param, Quaternion rotation);
public abstract void VehicleFlags(int param, bool remove);
public abstract void SetVolumeDetect(int param); // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
/// <summary>
/// Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
/// </summary>
public abstract void SetVolumeDetect(int param);
public abstract Vector3 GeometricCenter { get; }
public abstract Vector3 CenterOfMass { get; }
/// <summary>
/// Velocity of this actor.
/// </summary>
/// <remarks>
/// Setting this provides a target velocity for physics scene updates.
/// Getting this returns the velocity calculated by physics scene updates, using factors such as target velocity,
/// time to accelerate and collisions.
/// </remarks>
public abstract Vector3 Velocity { get; set; }
public abstract Vector3 Torque { get; set; }
public abstract float CollisionScore { get; set;}
public abstract Vector3 Acceleration { get; }

View File

@ -886,7 +886,6 @@ namespace OpenSim.Region.Physics.OdePlugin
d.BodyAddForce(Body, force.X, force.Y, force.Z);
//d.BodySetRotation(Body, ref m_StandUpRotation);
//standupStraight();
}
}
@ -901,7 +900,8 @@ namespace OpenSim.Region.Physics.OdePlugin
/// <param name="timeStep"></param>
/// <param name="defects">
/// If there is something wrong with the character (e.g. its position is non-finite)
/// then it is added to this list. The ODE structures associated with it are also destroyed.</param>
/// then it is added to this list. The ODE structures associated with it are also destroyed.
/// </param>
public void Move(float timeStep, List<OdeCharacter> defects)
{
// no lock; for now it's only called from within Simulate()
@ -995,6 +995,10 @@ namespace OpenSim.Region.Physics.OdePlugin
// we're in mid air suspended
vec.X = ((_target_velocity.X / movementdivisor) - vel.X) * (PID_D / 6);
vec.Y = ((_target_velocity.Y / movementdivisor) - vel.Y) * (PID_D / 6);
// m_log.DebugFormat(
// "[ODE CHARACTER]: !m_iscolliding && flying, vec {0}, _target_velocity {1}, movementdivisor {2}, vel {3}",
// vec, _target_velocity, movementdivisor, vel);
}
if (m_iscolliding && !flying && _target_velocity.Z > 0.0f)
@ -1167,7 +1171,7 @@ namespace OpenSim.Region.Physics.OdePlugin
/// <summary>
/// Used internally to destroy the ODE structures associated with this character.
/// </summary>
public void DestroyOdeStructures()
private void DestroyOdeStructures()
{
// destroy avatar capsule and related ODE data
if (Amotor != IntPtr.Zero)