From 8264ba849f24ed201bfe38e651932cc80fd9d3dc Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 23 Aug 2007 11:18:16 +0000 Subject: Added a PhysicsActor PhysActor member to SceneObjectPart, and made it so this is set when registering the prims with the physics engine. Position changes of the prim is now updated straight away to physic engine. (note at the moment, only root prim is registered with physics engine. Think we need to decide how we are going to manage child prims and physics.) As before this is all currently disabled (in scene.cs) until its in a bit more working condition. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 5 +++++ 1 file changed, 5 insertions(+) (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 56ac9be..7e34637 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -11,6 +11,7 @@ using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; using OpenSim.Physics.Manager; using OpenSim.Framework.Data; +using OpenSim.Physics.Manager; namespace OpenSim.Region.Environment.Scenes { @@ -89,6 +90,10 @@ namespace OpenSim.Region.Environment.Scenes part.GroupPosition = value; } } + if (m_rootPart.PhysActor != null) + { + m_rootPart.PhysActor.Position = new PhysicsVector(m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y, m_rootPart.GroupPosition.Z); + } } } -- cgit v1.1