BulletSim: don't modify angular parameters when doing LIMIT_MOTOR_UP.

It was a dumb idea to try and do a nose over feature for jumping cars anyway.
Add better logging of native shape creation/reuse so can  tell the difference.
user_profiles
Robert Adams 2013-01-15 15:07:38 -08:00
parent 61ff79587b
commit 5d098d8f17
5 changed files with 30 additions and 28 deletions

View File

@ -215,7 +215,7 @@ public sealed class BSCharacter : BSPhysObject
// Add special movement force to allow avatars to walk up stepped surfaces.
moveForce += WalkUpStairs();
DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", LocalID, stepVelocity, _velocity, Mass, moveForce);
// DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", LocalID, stepVelocity, _velocity, Mass, moveForce);
PhysicsScene.PE.ApplyCentralImpulse(PhysBody, moveForce);
});
}

View File

@ -1160,8 +1160,10 @@ namespace OpenSim.Region.Physics.BulletSPlugin
if (!Prim.IsColliding && VehicleVelocity.Z > 0.1)
{
// Get rid of any of the velocity vector that is pushing us up.
VehicleVelocity += new Vector3(0, 0, -VehicleVelocity.Z);
float upVelocity = VehicleVelocity.Z;
VehicleVelocity += new Vector3(0, 0, -upVelocity);
/*
// If we're pointed up into the air, we should nose down
Vector3 pointingDirection = Vector3.UnitX * VehicleOrientation;
// The rotation around the Y axis is pitch up or down
@ -1175,11 +1177,9 @@ namespace OpenSim.Region.Physics.BulletSPlugin
VDetailLog("{0}, MoveLinear,limitMotorUp,newVel={1},pntDir={2},corrFrc={3},aCorr={4}",
Prim.LocalID, VehicleVelocity, pointingDirection, angularCorrectionForce, angularCorrectionVector);
}
else
{
VDetailLog("{0}, MoveLinear,limitMotorUp,newVel={1},pntDir={2}",
Prim.LocalID, VehicleVelocity, pointingDirection);
}
*/
VDetailLog("{0}, MoveLinear,limitMotorUp,collide={1},upVel={2},newVel={3}",
Prim.LocalID, Prim.IsColliding, upVelocity, VehicleVelocity);
}
}
}

View File

@ -311,7 +311,7 @@ public sealed class BSLinksetCompound : BSLinkset
else
{
// Rebuild the compound shape with the child removed
ScheduleRebuild(child);
ScheduleRebuild(LinksetRoot);
}
}
return;

View File

@ -442,7 +442,8 @@ public sealed class BSShapeCollection : IDisposable
return ret;
}
// Create a mesh/hull shape or a native shape if 'nativeShapePossible' is 'true'.
// Create a mesh, hull or native shape.
// Return 'true' if the prim's shape was changed.
public bool CreateGeomNonSpecial(bool forceRebuild, BSPhysObject prim, ShapeDestructionCallback shapeCallback)
{
bool ret = false;
@ -472,7 +473,7 @@ public sealed class BSShapeCollection : IDisposable
if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,maybeNative,force={1},primScale={2},primSize={3},primShape={4}",
prim.LocalID, forceRebuild, prim.Scale, prim.Size, prim.PhysShape.type);
// It doesn't look like Bullet scales spheres so make sure the scales are all equal
// It doesn't look like Bullet scales native spheres so make sure the scales are all equal
if ((pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1)
&& pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z)
{
@ -484,9 +485,9 @@ public sealed class BSShapeCollection : IDisposable
{
ret = GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_SPHERE,
FixedShapeKey.KEY_SPHERE, shapeCallback);
if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},shape={2}",
prim.LocalID, forceRebuild, prim.PhysShape);
}
if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},rebuilt={2},shape={3}",
prim.LocalID, forceRebuild, ret, prim.PhysShape);
}
if (!haveShape && pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
{
@ -498,9 +499,9 @@ public sealed class BSShapeCollection : IDisposable
{
ret = GetReferenceToNativeShape( prim, BSPhysicsShapeType.SHAPE_BOX,
FixedShapeKey.KEY_BOX, shapeCallback);
if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},shape={2}",
prim.LocalID, forceRebuild, prim.PhysShape);
}
if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},rebuilt={2},shape={3}",
prim.LocalID, forceRebuild, ret, prim.PhysShape);
}
}
@ -513,7 +514,7 @@ public sealed class BSShapeCollection : IDisposable
return ret;
}
// return 'true' if the shape was changed
// return 'true' if the prim's shape was changed.
public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback)
{
@ -921,8 +922,9 @@ public sealed class BSShapeCollection : IDisposable
}
}
// While we figure out the real problem, stick in a simple box for the object.
// While we wait for the mesh defining asset to be loaded, stick in a simple box for the object.
BulletShape fillinShape = BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX);
DetailLog("{0},BSShapeCollection.VerifyMeshCreated,boxTempShape", prim.LocalID);
return fillinShape;
}

View File

@ -1,18 +1,9 @@
CURRENT PRIORITIES
=================================================
Crazyness during 20130115 office hours was PositionAdjustUnderground for both char and prim
m1:logs/20130115.0934/physics-BulletSim-20130115083613.log
Creation of Neb's terrain made the terrain "disappear". Everything started to fall
and then get restored to be above terrain.
Create tests for different interface components
Have test objects/scripts measure themselves and turn color if correct/bad
Test functions in SL and calibrate correctness there
Create auto rezzer and tracker to run through the tests
Mantis 6040 script http://opensimulator.org/mantis/view.php?id=6040
Msg Kayaker on OSGrid when working
Teravus llMoveToTarget script debug
Mixing of hover, buoyancy/gravity, moveToTarget, into one force
Surf board debugging
Boats floating at proper level
Nebadon vehicles turning funny in arena
limitMotorUp calibration (more down?)
@ -25,8 +16,6 @@ vehicle angular banking
Avatars walking up stairs (HALF DONE)
Radius of the capsule affects ability to climb edges.
Vehicle movement on terrain smoothness
Surfboard go wonky when turning
Angular motor direction is global coordinates rather than local coordinates?
Boats float low in the water (DONE)
Avatar movement
flying into a wall doesn't stop avatar who keeps appearing to move through the obstacle (DONE)
@ -43,6 +32,10 @@ Add material densities to the material types
CRASHES
=================================================
Crazyness during 20130115 office hours was PositionAdjustUnderground for both char and prim
m1:logs/20130115.0934/physics-BulletSim-20130115083613.log
Creation of Neb's terrain made the terrain "disappear". Everything started to fall
and then get restored to be above terrain.
20121129.1411: editting/moving phys object across region boundries causes crash
getPos-> btRigidBody::upcast -> getBodyType -> BOOM
20121128.1600: mesh object not rezzing (no physics mesh).
@ -149,6 +142,10 @@ Eliminate collisions between objects in a linkset. (LinksetConstraint)
MORE
======================================================
Create tests for different interface components
Have test objects/scripts measure themselves and turn color if correct/bad
Test functions in SL and calibrate correctness there
Create auto rezzer and tracker to run through the tests
Use the HACD convex hull routine in Bullet rather than the C# version.
Do we need to do convex hulls all the time? Can complex meshes be left meshes?
There is some problem with meshes and collisions
@ -305,3 +302,6 @@ Disable activity of passive linkset children. (DONE)
around and need to be phantomized so they don't collide, ...
Remove HeightmapInfo from terrain specification (DONE)
Since C++ code does not need terrain height, this structure et al are not needed.
Surfboard go wonky when turning (DONE)
Angular motor direction is global coordinates rather than local coordinates?
(Resolution: made angular motor direction correct coordinate system)