aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-29 08:03:57 -0800
committerRobert Adams2012-12-29 08:03:57 -0800
commitdb6c0363f05db8b2a180eff04db9138a378d227f (patch)
treef5bb7eb9bb396c3d8c05066aa9da5b7bbf026b1b /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentBulletSim: update values in OpenSimDefaults.ini to reflect the values really ... (diff)
downloadopensim-SC-db6c0363f05db8b2a180eff04db9138a378d227f.zip
opensim-SC-db6c0363f05db8b2a180eff04db9138a378d227f.tar.gz
opensim-SC-db6c0363f05db8b2a180eff04db9138a378d227f.tar.bz2
opensim-SC-db6c0363f05db8b2a180eff04db9138a378d227f.tar.xz
BulletSim: tweeking avatar capsule code in an attempt to have
asymmetrical avatar capsule work now that rotation is being passed from the simulator. Turns out the Bullet capsule is just not very functional: it doesn't scale properly, the implementation only half does asymmetry and, in general, is hard to work with. Avatar shape is about what it was before these changes. Added initial data structures for avatar shape mesh.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 65ebcaa..0cc51b0 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -420,8 +420,7 @@ public sealed class BSShapeCollection : IDisposable
420 if (!haveShape && prim.PreferredPhysicalShape == BSPhysicsShapeType.SHAPE_CAPSULE) 420 if (!haveShape && prim.PreferredPhysicalShape == BSPhysicsShapeType.SHAPE_CAPSULE)
421 { 421 {
422 // an avatar capsule is close to a native shape (it is not shared) 422 // an avatar capsule is close to a native shape (it is not shared)
423 GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_CAPSULE, 423 GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_CAPSULE, FixedShapeKey.KEY_CAPSULE, shapeCallback);
424 FixedShapeKey.KEY_CAPSULE, shapeCallback);
425 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.PhysShape); 424 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.PhysShape);
426 ret = true; 425 ret = true;
427 haveShape = true; 426 haveShape = true;
@@ -573,6 +572,9 @@ public sealed class BSShapeCollection : IDisposable
573 { 572 {
574 // The proper scale has been calculated in the prim. 573 // The proper scale has been calculated in the prim.
575 newShape = new BulletShape( 574 newShape = new BulletShape(
575 // Bullet's capsule total height is the passed "height + (radius * 2)" so, the base
576 // capsule is radius of 0.5f (1 diameter) and height of two (1.0f + 0.5f * 2)".
577 // This must be taken into account when computing the scaling of the capsule.
576 BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1f, 1f, prim.Scale) 578 BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1f, 1f, prim.Scale)
577 , shapeType); 579 , shapeType);
578 if (DDetail) DetailLog("{0},BSShapeCollection.BuiletPhysicalNativeShape,capsule,scale={1}", prim.LocalID, prim.Scale); 580 if (DDetail) DetailLog("{0},BSShapeCollection.BuiletPhysicalNativeShape,capsule,scale={1}", prim.LocalID, prim.Scale);