diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 0d8bb03..de69fa0 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -86,10 +86,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
86 | PhysBody = new BulletBody(localID); | 86 | PhysBody = new BulletBody(localID); |
87 | PhysShape = new BulletShape(); | 87 | PhysShape = new BulletShape(); |
88 | 88 | ||
89 | // A linkset of just me | ||
90 | Linkset = BSLinkset.Factory(PhysicsScene, this); | ||
91 | PositionDisplacement = OMV.Vector3.Zero; | ||
92 | |||
93 | LastAssetBuildFailed = false; | 89 | LastAssetBuildFailed = false; |
94 | 90 | ||
95 | // Default material type. Also sets Friction, Restitution and Density. | 91 | // Default material type. Also sets Friction, Restitution and Density. |
@@ -117,8 +113,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
117 | public string PhysObjectName { get; protected set; } | 113 | public string PhysObjectName { get; protected set; } |
118 | public string TypeName { get; protected set; } | 114 | public string TypeName { get; protected set; } |
119 | 115 | ||
120 | public BSLinkset Linkset { get; set; } | ||
121 | public BSLinksetInfo LinksetInfo { get; set; } | ||
122 | 116 | ||
123 | // Return the object mass without calculating it or having side effects | 117 | // Return the object mass without calculating it or having side effects |
124 | public abstract float RawMass { get; } | 118 | public abstract float RawMass { get; } |
@@ -188,15 +182,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
188 | public abstract OMV.Vector3 RawPosition { get; set; } | 182 | public abstract OMV.Vector3 RawPosition { get; set; } |
189 | public abstract OMV.Vector3 ForcePosition { get; set; } | 183 | public abstract OMV.Vector3 ForcePosition { get; set; } |
190 | 184 | ||
191 | // 'Position' and 'Orientation' is what the simulator thinks the positions of the prim is. | ||
192 | // Because Bullet needs the zero coordinate to be the center of mass of the linkset, | ||
193 | // sometimes it is necessary to displace the position the physics engine thinks | ||
194 | // the position is. PositionDisplacement must be added and removed from the | ||
195 | // position as the simulator position is stored and fetched from the physics | ||
196 | // engine. Similar to OrientationDisplacement. | ||
197 | public virtual OMV.Vector3 PositionDisplacement { get; set; } | ||
198 | public virtual OMV.Quaternion OrientationDisplacement { get; set; } | ||
199 | |||
200 | public abstract OMV.Quaternion RawOrientation { get; set; } | 185 | public abstract OMV.Quaternion RawOrientation { get; set; } |
201 | public abstract OMV.Quaternion ForceOrientation { get; set; } | 186 | public abstract OMV.Quaternion ForceOrientation { get; set; } |
202 | 187 | ||
@@ -302,22 +287,16 @@ public abstract class BSPhysObject : PhysicsActor | |||
302 | CollidingObjectStep = PhysicsScene.SimulationStep; | 287 | CollidingObjectStep = PhysicsScene.SimulationStep; |
303 | } | 288 | } |
304 | 289 | ||
305 | // prims in the same linkset cannot collide with each other | ||
306 | if (collidee != null && (this.Linkset.LinksetID == collidee.Linkset.LinksetID)) | ||
307 | { | ||
308 | return ret; | ||
309 | } | ||
310 | |||
311 | CollisionAccumulation++; | 290 | CollisionAccumulation++; |
312 | 291 | ||
313 | // For movement tests, remember if we are colliding with an object that is moving. | 292 | // For movement tests, remember if we are colliding with an object that is moving. |
314 | ColliderIsMoving = collidee != null ? collidee.RawVelocity != OMV.Vector3.Zero : false; | 293 | ColliderIsMoving = collidee != null ? (collidee.RawVelocity != OMV.Vector3.Zero) : false; |
315 | 294 | ||
316 | // If someone has subscribed for collision events log the collision so it will be reported up | 295 | // If someone has subscribed for collision events log the collision so it will be reported up |
317 | if (SubscribedEvents()) { | 296 | if (SubscribedEvents()) { |
318 | CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth)); | 297 | CollisionCollection.AddCollider(collidingWith, new ContactPoint(contactPoint, contactNormal, pentrationDepth)); |
319 | DetailLog("{0},{1}.Collison.AddCollider,call,with={2},point={3},normal={4},depth={5}", | 298 | DetailLog("{0},{1}.Collison.AddCollider,call,with={2},point={3},normal={4},depth={5},colliderMoving={6}", |
320 | LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth); | 299 | LocalID, TypeName, collidingWith, contactPoint, contactNormal, pentrationDepth, ColliderIsMoving); |
321 | 300 | ||
322 | ret = true; | 301 | ret = true; |
323 | } | 302 | } |