diff options
author | Robert Adams | 2012-12-11 00:02:20 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-11 00:02:20 -0800 |
commit | ebf30e7ba66446d7018346c12111d65a030d2786 (patch) | |
tree | 0e0c858d173927a5097d7c3702a59ae704ac54ea /OpenSim/Region/Physics | |
parent | BulletSim: comment out some chatty debug logging. Rearrange some code in BSDy... (diff) | |
download | opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.zip opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.tar.gz opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.tar.bz2 opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.tar.xz |
BulletSim: set mass for single prim linksets when going physical. This fixes single prim vehicles not working (the surf board now zooms).
Diffstat (limited to 'OpenSim/Region/Physics')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index fe5b5e3..d2abdb4 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -110,12 +110,19 @@ public sealed class BSLinksetCompound : BSLinkset | |||
110 | { | 110 | { |
111 | bool ret = false; | 111 | bool ret = false; |
112 | DetailLog("{0},BSLinksetCompound.MakeDynamic,call,IsRoot={1}", child.LocalID, IsRoot(child)); | 112 | DetailLog("{0},BSLinksetCompound.MakeDynamic,call,IsRoot={1}", child.LocalID, IsRoot(child)); |
113 | if (!IsRoot(child)) | 113 | if (IsRoot(child)) |
114 | { | ||
115 | // The root is going dynamic. Make sure mass is properly set. | ||
116 | m_mass = ComputeLinksetMass(); | ||
117 | } | ||
118 | else | ||
114 | { | 119 | { |
115 | // The origional prims are removed from the world as the shape of the root compound | 120 | // The origional prims are removed from the world as the shape of the root compound |
116 | // shape takes over. | 121 | // shape takes over. |
117 | BulletSimAPI.AddToCollisionFlags2(child.PhysBody.ptr, CollisionFlags.CF_NO_CONTACT_RESPONSE); | 122 | BulletSimAPI.AddToCollisionFlags2(child.PhysBody.ptr, CollisionFlags.CF_NO_CONTACT_RESPONSE); |
118 | BulletSimAPI.ForceActivationState2(child.PhysBody.ptr, ActivationState.DISABLE_SIMULATION); | 123 | BulletSimAPI.ForceActivationState2(child.PhysBody.ptr, ActivationState.DISABLE_SIMULATION); |
124 | // We don't want collisions from the old linkset children. | ||
125 | BulletSimAPI.RemoveFromCollisionFlags2(child.PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); | ||
119 | ret = true; | 126 | ret = true; |
120 | } | 127 | } |
121 | return ret; | 128 | return ret; |