aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs3
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs3
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs5
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs10
4 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index c16b7d3..311cf4f 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -617,7 +617,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
617 // Vehicles report collision events so we know when it's on the ground 617 // Vehicles report collision events so we know when it's on the ground
618 m_physicsScene.PE.AddToCollisionFlags(ControllingPrim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS); 618 m_physicsScene.PE.AddToCollisionFlags(ControllingPrim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS);
619 619
620 ControllingPrim.Inertia = m_physicsScene.PE.CalculateLocalInertia(ControllingPrim.PhysShape.physShapeInfo, m_vehicleMass); 620 Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(ControllingPrim.PhysShape.physShapeInfo, m_vehicleMass);
621 ControllingPrim.Inertia = inertia * BSParam.VehicleInertiaFactor;
621 m_physicsScene.PE.SetMassProps(ControllingPrim.PhysBody, m_vehicleMass, ControllingPrim.Inertia); 622 m_physicsScene.PE.SetMassProps(ControllingPrim.PhysBody, m_vehicleMass, ControllingPrim.Inertia);
622 m_physicsScene.PE.UpdateInertiaTensor(ControllingPrim.PhysBody); 623 m_physicsScene.PE.UpdateInertiaTensor(ControllingPrim.PhysBody);
623 624
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index c19eda1..e98a7fb 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -148,6 +148,7 @@ public static class BSParam
148 public static float VehicleRestitution { get; private set; } 148 public static float VehicleRestitution { get; private set; }
149 public static Vector3 VehicleLinearFactor { get; private set; } 149 public static Vector3 VehicleLinearFactor { get; private set; }
150 public static Vector3 VehicleAngularFactor { get; private set; } 150 public static Vector3 VehicleAngularFactor { get; private set; }
151 public static Vector3 VehicleInertiaFactor { get; private set; }
151 public static float VehicleGroundGravityFudge { get; private set; } 152 public static float VehicleGroundGravityFudge { get; private set; }
152 public static float VehicleAngularBankingTimescaleFudge { get; private set; } 153 public static float VehicleAngularBankingTimescaleFudge { get; private set; }
153 public static bool VehicleDebuggingEnable { get; private set; } 154 public static bool VehicleDebuggingEnable { get; private set; }
@@ -583,6 +584,8 @@ public static class BSParam
583 new Vector3(1f, 1f, 1f) ), 584 new Vector3(1f, 1f, 1f) ),
584 new ParameterDefn<Vector3>("VehicleAngularFactor", "Fraction of physical angular changes applied to vehicle (<0,0,0> to <1,1,1>)", 585 new ParameterDefn<Vector3>("VehicleAngularFactor", "Fraction of physical angular changes applied to vehicle (<0,0,0> to <1,1,1>)",
585 new Vector3(1f, 1f, 1f) ), 586 new Vector3(1f, 1f, 1f) ),
587 new ParameterDefn<Vector3>("VehicleInertiaFactor", "Fraction of physical inertia applied (<0,0,0> to <1,1,1>)",
588 new Vector3(1f, 1f, 1f) ),
586 new ParameterDefn<float>("VehicleFriction", "Friction of vehicle on the ground (0.0 - 1.0)", 589 new ParameterDefn<float>("VehicleFriction", "Friction of vehicle on the ground (0.0 - 1.0)",
587 0.0f ), 590 0.0f ),
588 new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)", 591 new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)",
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 046c12c..395dbe3 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -580,7 +580,6 @@ public class BSShapeHull : BSShape
580 PrimitiveBaseShape pbs, OMV.Vector3 size, float lod) 580 PrimitiveBaseShape pbs, OMV.Vector3 size, float lod)
581 { 581 {
582 BulletShape newShape = new BulletShape(); 582 BulletShape newShape = new BulletShape();
583 newShape.shapeKey = newHullKey;
584 583
585 IMesh meshData = null; 584 IMesh meshData = null;
586 List<List<OMV.Vector3>> allHulls = null; 585 List<List<OMV.Vector3>> allHulls = null;
@@ -784,6 +783,7 @@ public class BSShapeHull : BSShape
784 // create the hull data structure in Bullet 783 // create the hull data structure in Bullet
785 newShape = physicsScene.PE.CreateHullShape(physicsScene.World, hullCount, convHulls); 784 newShape = physicsScene.PE.CreateHullShape(physicsScene.World, hullCount, convHulls);
786 } 785 }
786 newShape.shapeKey = newHullKey;
787 return newShape; 787 return newShape;
788 } 788 }
789 // Callback from convex hull creater with a newly created hull. 789 // Callback from convex hull creater with a newly created hull.
@@ -908,6 +908,7 @@ public class BSShapeCompound : BSShape
908 } 908 }
909 else 909 else
910 { 910 {
911 // Didn't find it in the lists of specific types. It could be compound.
911 if (physicsScene.PE.IsCompound(pShape)) 912 if (physicsScene.PE.IsCompound(pShape))
912 { 913 {
913 BSShapeCompound recursiveCompound = new BSShapeCompound(pShape); 914 BSShapeCompound recursiveCompound = new BSShapeCompound(pShape);
@@ -915,6 +916,7 @@ public class BSShapeCompound : BSShape
915 } 916 }
916 else 917 else
917 { 918 {
919 // If none of the above, maybe it is a simple native shape.
918 if (physicsScene.PE.IsNativeShape(pShape)) 920 if (physicsScene.PE.IsNativeShape(pShape))
919 { 921 {
920 BSShapeNative nativeShape = new BSShapeNative(pShape); 922 BSShapeNative nativeShape = new BSShapeNative(pShape);
@@ -1054,6 +1056,7 @@ public class BSShapeGImpact : BSShape
1054 1056
1055 // Check to see if mesh was created (might require an asset). 1057 // Check to see if mesh was created (might require an asset).
1056 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 1058 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
1059 newShape.shapeKey = newMeshKey;
1057 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed) 1060 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed)
1058 { 1061 {
1059 // If a mesh was what was created, remember the built shape for later sharing. 1062 // If a mesh was what was created, remember the built shape for later sharing.
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 91339d2..16d65eb 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Physics.Meshing
74 private const string baseDir = null; //"rawFiles"; 74 private const string baseDir = null; //"rawFiles";
75#endif 75#endif
76 // If 'true', lots of DEBUG logging of asset parsing details 76 // If 'true', lots of DEBUG logging of asset parsing details
77 private bool debugDetail = true; 77 private bool debugDetail = false;
78 78
79 private bool cacheSculptMaps = true; 79 private bool cacheSculptMaps = true;
80 private string decodedSculptMapPath = null; 80 private string decodedSculptMapPath = null;
@@ -94,8 +94,11 @@ namespace OpenSim.Region.Physics.Meshing
94 94
95 decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache"); 95 decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache");
96 cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps); 96 cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps);
97 if(mesh_config != null) 97 if (mesh_config != null)
98 {
98 useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh); 99 useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh);
100 debugDetail = mesh_config.GetBoolean("LogMeshDetails", debugDetail);
101 }
99 102
100 try 103 try
101 { 104 {
@@ -415,7 +418,7 @@ namespace OpenSim.Region.Physics.Meshing
415 418
416 if (debugDetail) 419 if (debugDetail)
417 { 420 {
418 string keys = "[MESH]: keys found in convexBlock: "; 421 string keys = LogHeader + " keys found in convexBlock: ";
419 foreach (KeyValuePair<string, OSD> kvp in convexBlock) 422 foreach (KeyValuePair<string, OSD> kvp in convexBlock)
420 keys += "'" + kvp.Key + "' "; 423 keys += "'" + kvp.Key + "' ";
421 m_log.Debug(keys); 424 m_log.Debug(keys);
@@ -890,6 +893,7 @@ namespace OpenSim.Region.Physics.Meshing
890 List<Vector3> verts = new List<Vector3>(); 893 List<Vector3> verts = new List<Vector3>();
891 foreach (var vert in hull) 894 foreach (var vert in hull)
892 verts.Add(vert * size); 895 verts.Add(vert * size);
896 hulls.Add(verts);
893 } 897 }
894 898
895 return hulls; 899 return hulls;