diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 33ae5a5..6359046 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -61,11 +61,11 @@ public sealed class BSLinksetCompound : BSLinkset | |||
61 | if (LinksetRoot.PhysBody.HasPhysicalBody) | 61 | if (LinksetRoot.PhysBody.HasPhysicalBody) |
62 | m_physicsScene.PE.SetGravity(LinksetRoot.PhysBody, gravity); | 62 | m_physicsScene.PE.SetGravity(LinksetRoot.PhysBody, gravity); |
63 | } | 63 | } |
64 | public override void ComputeLocalInertia(OMV.Vector3 inertiaFactor) | 64 | public override void ComputeAndSetLocalInertia(OMV.Vector3 inertiaFactor, float linksetMass) |
65 | { | 65 | { |
66 | OMV.Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(LinksetRoot.PhysShape.physShapeInfo, LinksetRoot.Mass); | 66 | OMV.Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(LinksetRoot.PhysShape.physShapeInfo, linksetMass); |
67 | LinksetRoot.Inertia = inertia * inertiaFactor; | 67 | LinksetRoot.Inertia = inertia * inertiaFactor; |
68 | m_physicsScene.PE.SetMassProps(LinksetRoot.PhysBody, LinksetRoot.Mass, LinksetRoot.Inertia); | 68 | m_physicsScene.PE.SetMassProps(LinksetRoot.PhysBody, linksetMass, LinksetRoot.Inertia); |
69 | m_physicsScene.PE.UpdateInertiaTensor(LinksetRoot.PhysBody); | 69 | m_physicsScene.PE.UpdateInertiaTensor(LinksetRoot.PhysBody); |
70 | } | 70 | } |
71 | public override void SetPhysicalCollisionFlags(CollisionFlags collFlags) | 71 | public override void SetPhysicalCollisionFlags(CollisionFlags collFlags) |
@@ -73,6 +73,11 @@ public sealed class BSLinksetCompound : BSLinkset | |||
73 | if (LinksetRoot.PhysBody.HasPhysicalBody) | 73 | if (LinksetRoot.PhysBody.HasPhysicalBody) |
74 | m_physicsScene.PE.SetCollisionFlags(LinksetRoot.PhysBody, collFlags); | 74 | m_physicsScene.PE.SetCollisionFlags(LinksetRoot.PhysBody, collFlags); |
75 | } | 75 | } |
76 | public override void AddToPhysicalCollisionFlags(CollisionFlags collFlags) | ||
77 | { | ||
78 | if (LinksetRoot.PhysBody.HasPhysicalBody) | ||
79 | m_physicsScene.PE.AddToCollisionFlags(LinksetRoot.PhysBody, collFlags); | ||
80 | } | ||
76 | public override void RemoveFromPhysicalCollisionFlags(CollisionFlags collFlags) | 81 | public override void RemoveFromPhysicalCollisionFlags(CollisionFlags collFlags) |
77 | { | 82 | { |
78 | if (LinksetRoot.PhysBody.HasPhysicalBody) | 83 | if (LinksetRoot.PhysBody.HasPhysicalBody) |