From 28ce3238020c4dca8f9aef711daf730bccf0d2f0 Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Fri, 17 Apr 2015 23:09:14 +0100 Subject: Enable grab feature (Ctrl+Drag) for non-physical link-sets and add code to handle spin (Ctrl+Shift+Drag) Signed-off-by: BlueWall --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0a1a226..9e5314d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2672,16 +2672,20 @@ namespace OpenSim.Region.Framework.Scenes } else { - //NonPhysicalGrabMovement(pos); + NonPhysicalGrabMovement(pos); } } else { - //NonPhysicalGrabMovement(pos); + NonPhysicalGrabMovement(pos); } } } + /// + /// Apply possition for grabbing non-physical linksets (ctrl+drag) + /// + /// New Position public void NonPhysicalGrabMovement(Vector3 pos) { AbsolutePosition = pos; @@ -2781,17 +2785,27 @@ namespace OpenSim.Region.Framework.Scenes } else { - //NonPhysicalSpinMovement(pos); + NonPhysicalSpinMovement(newOrientation); } } else { - //NonPhysicalSpinMovement(pos); + NonPhysicalSpinMovement(newOrientation); } } } /// + /// Apply rotation for spinning non-physical linksets (ctrl+shift+drag) + /// + /// New Rotation + private void NonPhysicalSpinMovement(Quaternion newOrientation) + { + UpdateGroupRotationR(newOrientation); + m_rootPart.SendTerseUpdateToAllClients(); + } + + /// /// Set the name of a prim /// /// -- cgit v1.1