Added a "force_simple_prim_meshing" option to the ODE settings in OpenSim.ini which will use meshes for collisions with simple prim shapes rather than internal ODE algorithms. This may help with Mantis #2905 and Mantis #3487 for those experimenting with capsule settings.
Note that this will increase memory usage and region startup time.0.6.5-rc1
parent
a416e75ddb
commit
5f1fa0d3d7
|
@ -184,6 +184,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private float minimumGroundFlightOffset = 3f;
|
||||
|
||||
public bool meshSculptedPrim = true;
|
||||
public bool forceSimplePrimMeshing = false;
|
||||
|
||||
public float meshSculptLOD = 32;
|
||||
public float MeshSculptphysicalLOD = 16;
|
||||
|
@ -408,6 +409,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f);
|
||||
bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f);
|
||||
|
||||
forceSimplePrimMeshing = physicsconfig.GetBoolean("force_simple_prim_meshing", forceSimplePrimMeshing);
|
||||
meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true);
|
||||
meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f);
|
||||
MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f);
|
||||
|
@ -1429,18 +1431,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
PhysicsActor result;
|
||||
IMesh mesh = null;
|
||||
|
||||
//switch (pbs.ProfileShape)
|
||||
//{
|
||||
// case ProfileShape.Square:
|
||||
// //support simple box & hollow box now; later, more shapes
|
||||
// if (needsMeshing(pbs))
|
||||
// {
|
||||
// mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
|
||||
// }
|
||||
|
||||
// break;
|
||||
//}
|
||||
|
||||
if (needsMeshing(pbs))
|
||||
mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
|
||||
|
||||
|
@ -2152,6 +2142,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
|
||||
// if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
|
||||
if (!forceSimplePrimMeshing)
|
||||
{
|
||||
if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
|
||||
|| (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
|
||||
&& pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z))
|
||||
|
@ -2171,6 +2163,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pbs.ProfileHollow != 0)
|
||||
iPropertiesNotSupportedDefault++;
|
||||
|
|
|
@ -570,6 +570,16 @@
|
|||
; default is false
|
||||
;use_NINJA_physics_joints = true
|
||||
|
||||
; ##
|
||||
; ## additional meshing options
|
||||
; ##
|
||||
|
||||
; physical collision mesh proxies are normally created for complex prim shapes, and collisions for simple boxes and
|
||||
; spheres are computed algorithmically. If you would rather have mesh proxies for simple prims, you can set this to
|
||||
; true. Note that this will increase memory usage and region startup time. Default is false.
|
||||
;force_simple_prim_meshing = true
|
||||
|
||||
|
||||
|
||||
[RemoteAdmin]
|
||||
enabled = false
|
||||
|
|
Loading…
Reference in New Issue