Merge branch 'master' into careminster
commit
ec22c84cb1
|
@ -617,7 +617,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
|||
// Vehicles report collision events so we know when it's on the ground
|
||||
m_physicsScene.PE.AddToCollisionFlags(ControllingPrim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS);
|
||||
|
||||
ControllingPrim.Inertia = m_physicsScene.PE.CalculateLocalInertia(ControllingPrim.PhysShape.physShapeInfo, m_vehicleMass);
|
||||
Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(ControllingPrim.PhysShape.physShapeInfo, m_vehicleMass);
|
||||
ControllingPrim.Inertia = inertia * BSParam.VehicleInertiaFactor;
|
||||
m_physicsScene.PE.SetMassProps(ControllingPrim.PhysBody, m_vehicleMass, ControllingPrim.Inertia);
|
||||
m_physicsScene.PE.UpdateInertiaTensor(ControllingPrim.PhysBody);
|
||||
|
||||
|
|
|
@ -148,6 +148,7 @@ public static class BSParam
|
|||
public static float VehicleRestitution { get; private set; }
|
||||
public static Vector3 VehicleLinearFactor { get; private set; }
|
||||
public static Vector3 VehicleAngularFactor { get; private set; }
|
||||
public static Vector3 VehicleInertiaFactor { get; private set; }
|
||||
public static float VehicleGroundGravityFudge { get; private set; }
|
||||
public static float VehicleAngularBankingTimescaleFudge { get; private set; }
|
||||
public static bool VehicleDebuggingEnable { get; private set; }
|
||||
|
@ -583,6 +584,8 @@ public static class BSParam
|
|||
new Vector3(1f, 1f, 1f) ),
|
||||
new ParameterDefn<Vector3>("VehicleAngularFactor", "Fraction of physical angular changes applied to vehicle (<0,0,0> to <1,1,1>)",
|
||||
new Vector3(1f, 1f, 1f) ),
|
||||
new ParameterDefn<Vector3>("VehicleInertiaFactor", "Fraction of physical inertia applied (<0,0,0> to <1,1,1>)",
|
||||
new Vector3(1f, 1f, 1f) ),
|
||||
new ParameterDefn<float>("VehicleFriction", "Friction of vehicle on the ground (0.0 - 1.0)",
|
||||
0.0f ),
|
||||
new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)",
|
||||
|
|
|
@ -580,7 +580,6 @@ public class BSShapeHull : BSShape
|
|||
PrimitiveBaseShape pbs, OMV.Vector3 size, float lod)
|
||||
{
|
||||
BulletShape newShape = new BulletShape();
|
||||
newShape.shapeKey = newHullKey;
|
||||
|
||||
IMesh meshData = null;
|
||||
List<List<OMV.Vector3>> allHulls = null;
|
||||
|
@ -784,6 +783,7 @@ public class BSShapeHull : BSShape
|
|||
// create the hull data structure in Bullet
|
||||
newShape = physicsScene.PE.CreateHullShape(physicsScene.World, hullCount, convHulls);
|
||||
}
|
||||
newShape.shapeKey = newHullKey;
|
||||
return newShape;
|
||||
}
|
||||
// Callback from convex hull creater with a newly created hull.
|
||||
|
@ -908,6 +908,7 @@ public class BSShapeCompound : BSShape
|
|||
}
|
||||
else
|
||||
{
|
||||
// Didn't find it in the lists of specific types. It could be compound.
|
||||
if (physicsScene.PE.IsCompound(pShape))
|
||||
{
|
||||
BSShapeCompound recursiveCompound = new BSShapeCompound(pShape);
|
||||
|
@ -915,6 +916,7 @@ public class BSShapeCompound : BSShape
|
|||
}
|
||||
else
|
||||
{
|
||||
// If none of the above, maybe it is a simple native shape.
|
||||
if (physicsScene.PE.IsNativeShape(pShape))
|
||||
{
|
||||
BSShapeNative nativeShape = new BSShapeNative(pShape);
|
||||
|
@ -1054,6 +1056,7 @@ public class BSShapeGImpact : BSShape
|
|||
|
||||
// Check to see if mesh was created (might require an asset).
|
||||
newShape = VerifyMeshCreated(physicsScene, newShape, prim);
|
||||
newShape.shapeKey = newMeshKey;
|
||||
if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed)
|
||||
{
|
||||
// If a mesh was what was created, remember the built shape for later sharing.
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
private const string baseDir = null; //"rawFiles";
|
||||
#endif
|
||||
// If 'true', lots of DEBUG logging of asset parsing details
|
||||
private bool debugDetail = true;
|
||||
private bool debugDetail = false;
|
||||
|
||||
private bool cacheSculptMaps = true;
|
||||
private string decodedSculptMapPath = null;
|
||||
|
@ -94,8 +94,11 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
|
||||
decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache");
|
||||
cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps);
|
||||
if(mesh_config != null)
|
||||
if (mesh_config != null)
|
||||
{
|
||||
useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh);
|
||||
debugDetail = mesh_config.GetBoolean("LogMeshDetails", debugDetail);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -415,7 +418,7 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
|
||||
if (debugDetail)
|
||||
{
|
||||
string keys = "[MESH]: keys found in convexBlock: ";
|
||||
string keys = LogHeader + " keys found in convexBlock: ";
|
||||
foreach (KeyValuePair<string, OSD> kvp in convexBlock)
|
||||
keys += "'" + kvp.Key + "' ";
|
||||
m_log.Debug(keys);
|
||||
|
@ -890,6 +893,7 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
List<Vector3> verts = new List<Vector3>();
|
||||
foreach (var vert in hull)
|
||||
verts.Add(vert * size);
|
||||
hulls.Add(verts);
|
||||
}
|
||||
|
||||
return hulls;
|
||||
|
|
Loading…
Reference in New Issue