aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorRobert Adams2012-10-17 08:30:10 -0700
committerRobert Adams2012-10-19 10:52:23 -0700
commite87a179c893ef246dae8338e0f56c3fe20458fbc (patch)
tree1699e1fc26a47ba000bbd2392df894dc3247f956 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentBulletSim: remove code in ShapeCollection that hinted at shape sharing. (diff)
downloadopensim-SC-e87a179c893ef246dae8338e0f56c3fe20458fbc.zip
opensim-SC-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.gz
opensim-SC-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.bz2
opensim-SC-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.xz
BulletSim: change nonimal physics frame rate to 55 to give same numbers as ODE.
Change character scaling to represent size of capsule (diameter rather than radius) Modify create capsule call to pass radius and height. Eliminate errors when calculating shape inertia (should have some type checking).
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 34dec26..b8ef338 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -141,18 +141,15 @@ public abstract class BSPhysObject : PhysicsActor
141 // if someone has subscribed for collision events.... 141 // if someone has subscribed for collision events....
142 if (SubscribedEvents()) { 142 if (SubscribedEvents()) {
143 CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth)); 143 CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth));
144 // DetailLog("{0},{1}.Collison.AddCollider,call,with={2},point={3},normal={4},depth={5}", 144 DetailLog("{0},{1}.Collison.AddCollider,call,with={2},point={3},normal={4},depth={5}",
145 // LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth); 145 LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth);
146 146
147 ret = true; 147 ret = true;
148 } 148 }
149 return ret; 149 return ret;
150 } 150 }
151 151
152 // Routine to send the collected collisions into the simulator. 152 // Send the collected collisions into the simulator.
153 // Also handles removal of this from the collection of objects with collisions if
154 // there are no collisions from this object. Mechanism is create one last
155 // collision event to make collision_end work.
156 // Called at taint time from within the Step() function thus no locking problems 153 // Called at taint time from within the Step() function thus no locking problems
157 // with CollisionCollection and ObjectsWithNoMoreCollisions. 154 // with CollisionCollection and ObjectsWithNoMoreCollisions.
158 // Return 'true' if there were some actual collisions passed up 155 // Return 'true' if there were some actual collisions passed up
@@ -161,10 +158,9 @@ public abstract class BSPhysObject : PhysicsActor
161 bool ret = true; 158 bool ret = true;
162 159
163 // throttle the collisions to the number of milliseconds specified in the subscription 160 // throttle the collisions to the number of milliseconds specified in the subscription
164 int nowTime = PhysicsScene.SimulationNowTime; 161 if (PhysicsScene.SimulationNowTime >= NextCollisionOkTime)
165 if (nowTime >= NextCollisionOkTime)
166 { 162 {
167 NextCollisionOkTime = nowTime + SubscribedEventsMs; 163 NextCollisionOkTime = PhysicsScene.SimulationNowTime + SubscribedEventsMs;
168 164
169 // We are called if we previously had collisions. If there are no collisions 165 // We are called if we previously had collisions. If there are no collisions
170 // this time, send up one last empty event so OpenSim can sense collision end. 166 // this time, send up one last empty event so OpenSim can sense collision end.