aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS
diff options
context:
space:
mode:
authorUbitUmarov2015-11-29 00:02:46 +0000
committerUbitUmarov2015-11-29 00:02:46 +0000
commit15f8a462166b5b6d6ec823402bb7addc2dc3f0d9 (patch)
treef63342f54a29a6b4340891ef9b6c750061a0c1f6 /OpenSim/Region/PhysicsModules/BulletS
parentlet old ODE trigger collision sounds like ubOde (diff)
downloadopensim-SC_OLD-15f8a462166b5b6d6ec823402bb7addc2dc3f0d9.zip
opensim-SC_OLD-15f8a462166b5b6d6ec823402bb7addc2dc3f0d9.tar.gz
opensim-SC_OLD-15f8a462166b5b6d6ec823402bb7addc2dc3f0d9.tar.bz2
opensim-SC_OLD-15f8a462166b5b6d6ec823402bb7addc2dc3f0d9.tar.xz
let Bullet do collision sounds (RAdams plz fix the relative speed)
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
index c3eb776..6adf219 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
@@ -485,13 +485,20 @@ public abstract class BSPhysObject : PhysicsActor
485 CollisionsLastTick = new CollisionEventUpdate(); 485 CollisionsLastTick = new CollisionEventUpdate();
486 CollisionsLastTickStep = PhysScene.SimulationStep; 486 CollisionsLastTickStep = PhysScene.SimulationStep;
487 } 487 }
488
488 CollisionsLastTick.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth)); 489 CollisionsLastTick.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth));
489 490
490 // If someone has subscribed for collision events log the collision so it will be reported up 491 // If someone has subscribed for collision events log the collision so it will be reported up
491 if (SubscribedEvents()) { 492 if (SubscribedEvents()) {
493 ContactPoint newContact = new ContactPoint(contactPoint, contactNormal, pentrationDepth);
494
495 // make collision sound work just setting a speed
496 // see ubOde
497 newContact.RelativeSpeed = 2.0f;
498
492 lock (PhysScene.CollisionLock) 499 lock (PhysScene.CollisionLock)
493 { 500 {
494 CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth)); 501 CollisionCollection.AddCollider(collidingWith, newContact);
495 } 502 }
496 DetailLog("{0},{1}.Collision.AddCollider,call,with={2},point={3},normal={4},depth={5},colliderMoving={6}", 503 DetailLog("{0},{1}.Collision.AddCollider,call,with={2},point={3},normal={4},depth={5},colliderMoving={6}",
497 LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth, ColliderIsMoving); 504 LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth, ColliderIsMoving);