diff options
Diffstat (limited to 'OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs index 0c79aa6..ae63cfa 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs | |||
@@ -269,7 +269,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
269 | /// </summary> | 269 | /// </summary> |
270 | public override bool IsColliding | 270 | public override bool IsColliding |
271 | { | 271 | { |
272 | get { return m_iscolliding; } | 272 | //#@ get { return m_iscolliding; } |
273 | get { //## | ||
274 | //Console.WriteLine(">>>>>>>>>>>> IC get = {0}", m_iscolliding); //## | ||
275 | return m_iscolliding; } //## | ||
273 | set | 276 | set |
274 | { | 277 | { |
275 | int i; | 278 | int i; |
@@ -307,6 +310,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
307 | { | 310 | { |
308 | m_iscolliding = true; | 311 | m_iscolliding = true; |
309 | } | 312 | } |
313 | // ## Console.WriteLine("IC SET = {0} t{1} f{2} i {3}", value, truecount, falsecount, m_iscolliding); | ||
310 | if (m_wascolliding != m_iscolliding) | 314 | if (m_wascolliding != m_iscolliding) |
311 | { | 315 | { |
312 | //base.SendCollisionUpdate(new CollisionEventUpdate()); | 316 | //base.SendCollisionUpdate(new CollisionEventUpdate()); |
@@ -589,7 +593,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
589 | Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); | 593 | Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); |
590 | _parent_scene.geom_name_map[Shell] = m_name; | 594 | _parent_scene.geom_name_map[Shell] = m_name; |
591 | _parent_scene.actor_name_map[Shell] = (PhysicsActor)this; | 595 | _parent_scene.actor_name_map[Shell] = (PhysicsActor)this; |
592 | //Console.WriteLine("**** Create {2} Dicts: actor={0} name={1}", _parent_scene.actor_name_map.Count, _parent_scene.geom_name_map.Count, m_name); | 596 | Console.WriteLine("**** Create {2} Dicts: actor={0} name={1} height={3} rad={4}", _parent_scene.actor_name_map.Count, _parent_scene.geom_name_map.Count, m_name, CAPSULE_LENGTH, CAPSULE_RADIUS); |
593 | 597 | ||
594 | d.GeomSetCategoryBits(Shell, (int)m_collisionCategories); | 598 | d.GeomSetCategoryBits(Shell, (int)m_collisionCategories); |
595 | d.GeomSetCollideBits(Shell, (int)m_collisionFlags); | 599 | d.GeomSetCollideBits(Shell, (int)m_collisionFlags); |
@@ -857,7 +861,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
857 | { | 861 | { |
858 | m_pidControllerActive = false; | 862 | m_pidControllerActive = false; |
859 | force *= 100f; | 863 | force *= 100f; |
860 | doForce(force); | 864 | //Console.WriteLine("DF 1"); // ## |
865 | if (!force.ApproxEquals(Vector3.Zero, 0.01f)) | ||
866 | doForce(force); | ||
861 | // If uncommented, things get pushed off world | 867 | // If uncommented, things get pushed off world |
862 | // | 868 | // |
863 | // m_log.Debug("Push!"); | 869 | // m_log.Debug("Push!"); |
@@ -896,7 +902,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
896 | d.BodyAddForce(Body, force.X, force.Y, force.Z); | 902 | d.BodyAddForce(Body, force.X, force.Y, force.Z); |
897 | //d.BodySetRotation(Body, ref m_StandUpRotation); | 903 | //d.BodySetRotation(Body, ref m_StandUpRotation); |
898 | //standupStraight(); | 904 | //standupStraight(); |
899 | 905 | d.Vector3 vel = d.BodyGetLinearVel(Body); //## | |
906 | //Console.WriteLine("AvVel <{0},{1},{2}>", vel.X, vel.Y, vel.Z); //## | ||
900 | } | 907 | } |
901 | } | 908 | } |
902 | 909 | ||
@@ -1103,12 +1110,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1103 | } | 1110 | } |
1104 | if (vec.IsFinite()) | 1111 | if (vec.IsFinite()) |
1105 | { | 1112 | { |
1106 | if (!vec.ApproxEquals(Vector3.Zero, 0.01f)) | 1113 | if (!vec.ApproxEquals(Vector3.Zero, 0.02f)) // 0.01 allows 0.002 !! |
1107 | { | 1114 | { |
1115 | //Console.WriteLine("DF 2"); // ## | ||
1116 | |||
1108 | doForce(vec); | 1117 | doForce(vec); |
1109 | if (!_zeroFlag) | 1118 | if (!_zeroFlag) |
1110 | { | 1119 | { |
1111 | AlignAvatarTiltWithCurrentDirectionOfMovement(vec); | 1120 | // AlignAvatarTiltWithCurrentDirectionOfMovement(vec); |
1112 | } | 1121 | } |
1113 | } | 1122 | } |
1114 | } | 1123 | } |