diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b6eae8efed..7602d6bf83 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3450,9 +3450,15 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 pVec = AbsolutePosition;
+/*
PhysicsActor = scene.AddAvatar(
LocalId, Firstname + "." + Lastname, pVec,
new Vector3(0.45f, 0.6f, Appearance.AvatarHeight), isFlying);
+*/
+
+ PhysicsActor = scene.AddAvatar(
+ LocalId, Firstname + "." + Lastname, pVec,
+ Appearance.AvatarBoxSize,Appearance.AvatarFeetOffset, isFlying);
//PhysicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
PhysicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index ce269fabc1..c07213e0b8 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -127,8 +127,10 @@ namespace OpenSim.Region.Physics.Manager
///
///
///
- public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying);
-
+ public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
+ {
+ return null;
+ }
///
/// Add an avatar
///
@@ -145,6 +147,18 @@ namespace OpenSim.Region.Physics.Manager
return ret;
}
+ public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size,float feetOffset, bool isFlying)
+ {
+ return null;
+ }
+
+ public virtual PhysicsActor AddAvatar(uint localID,string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
+ {
+ PhysicsActor ret = AddAvatar(avName, position, size,feetOffset, isFlying);
+ if (ret != null) ret.LocalID = localID;
+ return ret;
+ }
+
///
/// Remove an avatar.
///
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index 9c245e6e00..15bdc5705f 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Physics.OdePlugin
- public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float density, float walk_divisor, float rundivisor)
+ public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float pfeetOffset, float density, float walk_divisor, float rundivisor)
{
m_uuid = UUID.Random();
@@ -192,6 +192,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if(m_size.Z <0.01f)
m_size.Z = 0.01f;
+ m_feetOffset = pfeetOffset;
m_orientation = Quaternion.Identity;
m_density = density;
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index 7d1d2fe997..2ba59407f2 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1388,13 +1388,13 @@ namespace OpenSim.Region.Physics.OdePlugin
#region Add/Remove Entities
- public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
+ public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
{
Vector3 pos;
pos.X = position.X;
pos.Y = position.Y;
pos.Z = position.Z;
- OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
+ OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
newAv.Flying = isFlying;
newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;