diff options
author | Robert Adams | 2013-01-15 15:07:38 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-15 21:08:46 -0800 |
commit | 5d098d8f17fe24d9ad2999ddce819787d02989ce (patch) | |
tree | 35f64a4781217e822b3793cfa0bec136d9894268 /OpenSim/Region | |
parent | BulletSim: add debugging messages to know when assets for physical (diff) | |
download | opensim-SC_OLD-5d098d8f17fe24d9ad2999ddce819787d02989ce.zip opensim-SC_OLD-5d098d8f17fe24d9ad2999ddce819787d02989ce.tar.gz opensim-SC_OLD-5d098d8f17fe24d9ad2999ddce819787d02989ce.tar.bz2 opensim-SC_OLD-5d098d8f17fe24d9ad2999ddce819787d02989ce.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region')
5 files changed, 30 insertions, 28 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 2e900b3..87a06c1 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -215,7 +215,7 @@ public sealed class BSCharacter : BSPhysObject | |||
215 | // Add special movement force to allow avatars to walk up stepped surfaces. | 215 | // Add special movement force to allow avatars to walk up stepped surfaces. |
216 | moveForce += WalkUpStairs(); | 216 | moveForce += WalkUpStairs(); |
217 | 217 | ||
218 | DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", LocalID, stepVelocity, _velocity, Mass, moveForce); | 218 | // DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", LocalID, stepVelocity, _velocity, Mass, moveForce); |
219 | PhysicsScene.PE.ApplyCentralImpulse(PhysBody, moveForce); | 219 | PhysicsScene.PE.ApplyCentralImpulse(PhysBody, moveForce); |
220 | }); | 220 | }); |
221 | } | 221 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index e434412..6601479 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -1160,8 +1160,10 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
1160 | if (!Prim.IsColliding && VehicleVelocity.Z > 0.1) | 1160 | if (!Prim.IsColliding && VehicleVelocity.Z > 0.1) |
1161 | { | 1161 | { |
1162 | // Get rid of any of the velocity vector that is pushing us up. | 1162 | // Get rid of any of the velocity vector that is pushing us up. |
1163 | VehicleVelocity += new Vector3(0, 0, -VehicleVelocity.Z); | 1163 | float upVelocity = VehicleVelocity.Z; |
1164 | VehicleVelocity += new Vector3(0, 0, -upVelocity); | ||
1164 | 1165 | ||
1166 | /* | ||
1165 | // If we're pointed up into the air, we should nose down | 1167 | // If we're pointed up into the air, we should nose down |
1166 | Vector3 pointingDirection = Vector3.UnitX * VehicleOrientation; | 1168 | Vector3 pointingDirection = Vector3.UnitX * VehicleOrientation; |
1167 | // The rotation around the Y axis is pitch up or down | 1169 | // The rotation around the Y axis is pitch up or down |
@@ -1175,11 +1177,9 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
1175 | VDetailLog("{0}, MoveLinear,limitMotorUp,newVel={1},pntDir={2},corrFrc={3},aCorr={4}", | 1177 | VDetailLog("{0}, MoveLinear,limitMotorUp,newVel={1},pntDir={2},corrFrc={3},aCorr={4}", |
1176 | Prim.LocalID, VehicleVelocity, pointingDirection, angularCorrectionForce, angularCorrectionVector); | 1178 | Prim.LocalID, VehicleVelocity, pointingDirection, angularCorrectionForce, angularCorrectionVector); |
1177 | } | 1179 | } |
1178 | else | 1180 | */ |
1179 | { | 1181 | VDetailLog("{0}, MoveLinear,limitMotorUp,collide={1},upVel={2},newVel={3}", |
1180 | VDetailLog("{0}, MoveLinear,limitMotorUp,newVel={1},pntDir={2}", | 1182 | Prim.LocalID, Prim.IsColliding, upVelocity, VehicleVelocity); |
1181 | Prim.LocalID, VehicleVelocity, pointingDirection); | ||
1182 | } | ||
1183 | } | 1183 | } |
1184 | } | 1184 | } |
1185 | } | 1185 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index eff909c..8c9a774 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -311,7 +311,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
311 | else | 311 | else |
312 | { | 312 | { |
313 | // Rebuild the compound shape with the child removed | 313 | // Rebuild the compound shape with the child removed |
314 | ScheduleRebuild(child); | 314 | ScheduleRebuild(LinksetRoot); |
315 | } | 315 | } |
316 | } | 316 | } |
317 | return; | 317 | return; |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs index 4f0d345..9fbfcdc 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |||
@@ -442,7 +442,8 @@ public sealed class BSShapeCollection : IDisposable | |||
442 | return ret; | 442 | return ret; |
443 | } | 443 | } |
444 | 444 | ||
445 | // Create a mesh/hull shape or a native shape if 'nativeShapePossible' is 'true'. | 445 | // Create a mesh, hull or native shape. |
446 | // Return 'true' if the prim's shape was changed. | ||
446 | public bool CreateGeomNonSpecial(bool forceRebuild, BSPhysObject prim, ShapeDestructionCallback shapeCallback) | 447 | public bool CreateGeomNonSpecial(bool forceRebuild, BSPhysObject prim, ShapeDestructionCallback shapeCallback) |
447 | { | 448 | { |
448 | bool ret = false; | 449 | bool ret = false; |
@@ -472,7 +473,7 @@ public sealed class BSShapeCollection : IDisposable | |||
472 | if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,maybeNative,force={1},primScale={2},primSize={3},primShape={4}", | 473 | if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,maybeNative,force={1},primScale={2},primSize={3},primShape={4}", |
473 | prim.LocalID, forceRebuild, prim.Scale, prim.Size, prim.PhysShape.type); | 474 | prim.LocalID, forceRebuild, prim.Scale, prim.Size, prim.PhysShape.type); |
474 | 475 | ||
475 | // It doesn't look like Bullet scales spheres so make sure the scales are all equal | 476 | // It doesn't look like Bullet scales native spheres so make sure the scales are all equal |
476 | if ((pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1) | 477 | if ((pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1) |
477 | && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z) | 478 | && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z) |
478 | { | 479 | { |
@@ -484,9 +485,9 @@ public sealed class BSShapeCollection : IDisposable | |||
484 | { | 485 | { |
485 | ret = GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_SPHERE, | 486 | ret = GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_SPHERE, |
486 | FixedShapeKey.KEY_SPHERE, shapeCallback); | 487 | FixedShapeKey.KEY_SPHERE, shapeCallback); |
487 | if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},shape={2}", | ||
488 | prim.LocalID, forceRebuild, prim.PhysShape); | ||
489 | } | 488 | } |
489 | if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},rebuilt={2},shape={3}", | ||
490 | prim.LocalID, forceRebuild, ret, prim.PhysShape); | ||
490 | } | 491 | } |
491 | if (!haveShape && pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) | 492 | if (!haveShape && pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) |
492 | { | 493 | { |
@@ -498,9 +499,9 @@ public sealed class BSShapeCollection : IDisposable | |||
498 | { | 499 | { |
499 | ret = GetReferenceToNativeShape( prim, BSPhysicsShapeType.SHAPE_BOX, | 500 | ret = GetReferenceToNativeShape( prim, BSPhysicsShapeType.SHAPE_BOX, |
500 | FixedShapeKey.KEY_BOX, shapeCallback); | 501 | FixedShapeKey.KEY_BOX, shapeCallback); |
501 | if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},shape={2}", | ||
502 | prim.LocalID, forceRebuild, prim.PhysShape); | ||
503 | } | 502 | } |
503 | if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},rebuilt={2},shape={3}", | ||
504 | prim.LocalID, forceRebuild, ret, prim.PhysShape); | ||
504 | } | 505 | } |
505 | } | 506 | } |
506 | 507 | ||
@@ -513,7 +514,7 @@ public sealed class BSShapeCollection : IDisposable | |||
513 | return ret; | 514 | return ret; |
514 | } | 515 | } |
515 | 516 | ||
516 | // return 'true' if the shape was changed | 517 | // return 'true' if the prim's shape was changed. |
517 | public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback) | 518 | public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback) |
518 | { | 519 | { |
519 | 520 | ||
@@ -921,8 +922,9 @@ public sealed class BSShapeCollection : IDisposable | |||
921 | } | 922 | } |
922 | } | 923 | } |
923 | 924 | ||
924 | // While we figure out the real problem, stick in a simple box for the object. | 925 | // While we wait for the mesh defining asset to be loaded, stick in a simple box for the object. |
925 | BulletShape fillinShape = BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX); | 926 | BulletShape fillinShape = BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX); |
927 | DetailLog("{0},BSShapeCollection.VerifyMeshCreated,boxTempShape", prim.LocalID); | ||
926 | 928 | ||
927 | return fillinShape; | 929 | return fillinShape; |
928 | } | 930 | } |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt index 067e64a..53b5530 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt | |||
@@ -1,18 +1,9 @@ | |||
1 | CURRENT PRIORITIES | 1 | CURRENT PRIORITIES |
2 | ================================================= | 2 | ================================================= |
3 | Crazyness during 20130115 office hours was PositionAdjustUnderground for both char and prim | ||
4 | m1:logs/20130115.0934/physics-BulletSim-20130115083613.log | ||
5 | Creation of Neb's terrain made the terrain "disappear". Everything started to fall | ||
6 | and then get restored to be above terrain. | ||
7 | Create tests for different interface components | ||
8 | Have test objects/scripts measure themselves and turn color if correct/bad | ||
9 | Test functions in SL and calibrate correctness there | ||
10 | Create auto rezzer and tracker to run through the tests | ||
11 | Mantis 6040 script http://opensimulator.org/mantis/view.php?id=6040 | 3 | Mantis 6040 script http://opensimulator.org/mantis/view.php?id=6040 |
12 | Msg Kayaker on OSGrid when working | 4 | Msg Kayaker on OSGrid when working |
13 | Teravus llMoveToTarget script debug | 5 | Teravus llMoveToTarget script debug |
14 | Mixing of hover, buoyancy/gravity, moveToTarget, into one force | 6 | Mixing of hover, buoyancy/gravity, moveToTarget, into one force |
15 | Surf board debugging | ||
16 | Boats floating at proper level | 7 | Boats floating at proper level |
17 | Nebadon vehicles turning funny in arena | 8 | Nebadon vehicles turning funny in arena |
18 | limitMotorUp calibration (more down?) | 9 | limitMotorUp calibration (more down?) |
@@ -25,8 +16,6 @@ vehicle angular banking | |||
25 | Avatars walking up stairs (HALF DONE) | 16 | Avatars walking up stairs (HALF DONE) |
26 | Radius of the capsule affects ability to climb edges. | 17 | Radius of the capsule affects ability to climb edges. |
27 | Vehicle movement on terrain smoothness | 18 | Vehicle movement on terrain smoothness |
28 | Surfboard go wonky when turning | ||
29 | Angular motor direction is global coordinates rather than local coordinates? | ||
30 | Boats float low in the water (DONE) | 19 | Boats float low in the water (DONE) |
31 | Avatar movement | 20 | Avatar movement |
32 | flying into a wall doesn't stop avatar who keeps appearing to move through the obstacle (DONE) | 21 | 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 | |||
43 | 32 | ||
44 | CRASHES | 33 | CRASHES |
45 | ================================================= | 34 | ================================================= |
35 | Crazyness during 20130115 office hours was PositionAdjustUnderground for both char and prim | ||
36 | m1:logs/20130115.0934/physics-BulletSim-20130115083613.log | ||
37 | Creation of Neb's terrain made the terrain "disappear". Everything started to fall | ||
38 | and then get restored to be above terrain. | ||
46 | 20121129.1411: editting/moving phys object across region boundries causes crash | 39 | 20121129.1411: editting/moving phys object across region boundries causes crash |
47 | getPos-> btRigidBody::upcast -> getBodyType -> BOOM | 40 | getPos-> btRigidBody::upcast -> getBodyType -> BOOM |
48 | 20121128.1600: mesh object not rezzing (no physics mesh). | 41 | 20121128.1600: mesh object not rezzing (no physics mesh). |
@@ -149,6 +142,10 @@ Eliminate collisions between objects in a linkset. (LinksetConstraint) | |||
149 | 142 | ||
150 | MORE | 143 | MORE |
151 | ====================================================== | 144 | ====================================================== |
145 | Create tests for different interface components | ||
146 | Have test objects/scripts measure themselves and turn color if correct/bad | ||
147 | Test functions in SL and calibrate correctness there | ||
148 | Create auto rezzer and tracker to run through the tests | ||
152 | Use the HACD convex hull routine in Bullet rather than the C# version. | 149 | Use the HACD convex hull routine in Bullet rather than the C# version. |
153 | Do we need to do convex hulls all the time? Can complex meshes be left meshes? | 150 | Do we need to do convex hulls all the time? Can complex meshes be left meshes? |
154 | There is some problem with meshes and collisions | 151 | There is some problem with meshes and collisions |
@@ -304,4 +301,7 @@ Disable activity of passive linkset children. (DONE) | |||
304 | Since the linkset is a compound object, the old prims are left lying | 301 | Since the linkset is a compound object, the old prims are left lying |
305 | around and need to be phantomized so they don't collide, ... | 302 | around and need to be phantomized so they don't collide, ... |
306 | Remove HeightmapInfo from terrain specification (DONE) | 303 | Remove HeightmapInfo from terrain specification (DONE) |
307 | Since C++ code does not need terrain height, this structure et al are not needed. \ No newline at end of file | 304 | Since C++ code does not need terrain height, this structure et al are not needed. |
305 | Surfboard go wonky when turning (DONE) | ||
306 | Angular motor direction is global coordinates rather than local coordinates? | ||
307 | (Resolution: made angular motor direction correct coordinate system) \ No newline at end of file | ||