From 0a5c48b1c820d0899ffb130c9bf0a59b04bc9099 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 2 Mar 2008 09:31:39 +0000 Subject: * This is a very icky implementation of physical linkset prim using fixed joints. This will change quite drastically, however it's fun to play with. * To play with this you must link your prim before setting it physical, otherwise they won't link in the physics engine properly. This will also be fixed. * Currently the linked prim are extremely unstable because I have yet to implement combining of forces with the same normal. This will also be fixed. In fact, the whole PhysicsActor, ODEPrim relationship will be reworked to consider groups from the get-go. * This implementation is better then it crashing your sim, so I'm commiting it for now. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 801e614..713c3ba 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1758,10 +1758,13 @@ namespace OpenSim.Region.Environment.Scenes { lock (m_parts) { + m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); foreach (SceneObjectPart part in m_parts.Values) { - part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); - + if (part.LocalID != m_rootPart.LocalID) + { + part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); + } // Hack to get the physics scene geometries in the right spot ResetChildPrimPhysicsPositions(); -- cgit v1.1