BulletSim: the minimum vehicle velocity was set too low so moving slow
was getting zeroed too easily. Added VehicleMinVelocity parameter.0.8.0.3
							parent
							
								
									c0cc5e0fa4
								
							
						
					
					
						commit
						3a7c8d1f32
					
				| 
						 | 
					@ -1011,8 +1011,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin
 | 
				
			||||||
                VDetailLog("{0},  MoveLinear,clampMax,origVelW={1},lenSq={2},maxVelSq={3},,newVelW={4}",
 | 
					                VDetailLog("{0},  MoveLinear,clampMax,origVelW={1},lenSq={2},maxVelSq={3},,newVelW={4}",
 | 
				
			||||||
                            ControllingPrim.LocalID, origVelW, newVelocityLengthSq, BSParam.VehicleMaxLinearVelocitySquared, VehicleVelocity);
 | 
					                            ControllingPrim.LocalID, origVelW, newVelocityLengthSq, BSParam.VehicleMaxLinearVelocitySquared, VehicleVelocity);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else if (newVelocityLengthSq < 0.001f)
 | 
					            else if (newVelocityLengthSq < BSParam.VehicleMinLinearVelocitySquared)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Vector3 origVelW = VehicleVelocity;         // DEBUG DEBUG
 | 
				
			||||||
 | 
					                VDetailLog("{0},  MoveLinear,clampMin,origVelW={1},lenSq={2}",
 | 
				
			||||||
 | 
					                            ControllingPrim.LocalID, origVelW, newVelocityLengthSq);
 | 
				
			||||||
                VehicleVelocity = Vector3.Zero;
 | 
					                VehicleVelocity = Vector3.Zero;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            VDetailLog("{0},  MoveLinear,done,isColl={1},newVel={2}", ControllingPrim.LocalID, ControllingPrim.HasSomeCollision, VehicleVelocity );
 | 
					            VDetailLog("{0},  MoveLinear,done,isColl={1},newVel={2}", ControllingPrim.LocalID, ControllingPrim.HasSomeCollision, VehicleVelocity );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -147,6 +147,8 @@ public static class BSParam
 | 
				
			||||||
    // Vehicle parameters
 | 
					    // Vehicle parameters
 | 
				
			||||||
    public static float VehicleMaxLinearVelocity { get; private set; }
 | 
					    public static float VehicleMaxLinearVelocity { get; private set; }
 | 
				
			||||||
    public static float VehicleMaxLinearVelocitySquared { get; private set; }
 | 
					    public static float VehicleMaxLinearVelocitySquared { get; private set; }
 | 
				
			||||||
 | 
					    public static float VehicleMinLinearVelocity { get; private set; }
 | 
				
			||||||
 | 
					    public static float VehicleMinLinearVelocitySquared { get; private set; }
 | 
				
			||||||
    public static float VehicleMaxAngularVelocity { get; private set; }
 | 
					    public static float VehicleMaxAngularVelocity { get; private set; }
 | 
				
			||||||
    public static float VehicleMaxAngularVelocitySq { get; private set; }
 | 
					    public static float VehicleMaxAngularVelocitySq { get; private set; }
 | 
				
			||||||
    public static float VehicleAngularDamping { get; private set; }
 | 
					    public static float VehicleAngularDamping { get; private set; }
 | 
				
			||||||
| 
						 | 
					@ -598,6 +600,10 @@ public static class BSParam
 | 
				
			||||||
            1000.0f,
 | 
					            1000.0f,
 | 
				
			||||||
            (s) => { return (float)VehicleMaxLinearVelocity; },
 | 
					            (s) => { return (float)VehicleMaxLinearVelocity; },
 | 
				
			||||||
            (s,v) => { VehicleMaxLinearVelocity = v; VehicleMaxLinearVelocitySquared = v * v; } ),
 | 
					            (s,v) => { VehicleMaxLinearVelocity = v; VehicleMaxLinearVelocitySquared = v * v; } ),
 | 
				
			||||||
 | 
					        new ParameterDefn<float>("VehicleMinLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle",
 | 
				
			||||||
 | 
					            0.001f,
 | 
				
			||||||
 | 
					            (s) => { return (float)VehicleMinLinearVelocity; },
 | 
				
			||||||
 | 
					            (s,v) => { VehicleMinLinearVelocity = v; VehicleMinLinearVelocitySquared = v * v; } ),
 | 
				
			||||||
        new ParameterDefn<float>("VehicleMaxAngularVelocity", "Maximum rotational velocity magnitude that can be assigned to a vehicle",
 | 
					        new ParameterDefn<float>("VehicleMaxAngularVelocity", "Maximum rotational velocity magnitude that can be assigned to a vehicle",
 | 
				
			||||||
            12.0f,
 | 
					            12.0f,
 | 
				
			||||||
            (s) => { return (float)VehicleMaxAngularVelocity; },
 | 
					            (s) => { return (float)VehicleMaxAngularVelocity; },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue