aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authornlin2009-04-10 06:39:52 +0000
committernlin2009-04-10 06:39:52 +0000
commit8e6c20b27fdb95b9008614eb36678508407a4d19 (patch)
tree562e0363e5e551c8d3fee03736d319f9e8963c64 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parent* Updated BulletDotNET dll with the ContactFlags definition. (diff)
downloadopensim-SC_OLD-8e6c20b27fdb95b9008614eb36678508407a4d19.zip
opensim-SC_OLD-8e6c20b27fdb95b9008614eb36678508407a4d19.tar.gz
opensim-SC_OLD-8e6c20b27fdb95b9008614eb36678508407a4d19.tar.bz2
opensim-SC_OLD-8e6c20b27fdb95b9008614eb36678508407a4d19.tar.xz
Handle ObjectSpin* packets to spin physical prims on Ctrl+Shift+Drag
Addresses Mantis #3381 The current implementation works as expected if the object has no rotation or only rotation around the Z axis; you can spin the object left or right (around the world Z axis). It works a little unexpectedly if the object has a non-Z-axis rotation; in this case the body is spun about its local Z axis, not the world Z-axis. (But SL also behaves oddly with a spin on an arbitrarily rotated object.)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index c2f9fd2..e6328dc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1342,6 +1342,47 @@ namespace OpenSim.Region.Framework.Scenes
1342 } 1342 }
1343 1343
1344 /// <summary> 1344 /// <summary>
1345 /// Start spinning the given object
1346 /// </summary>
1347 /// <param name="objectID"></param>
1348 /// <param name="rotation"></param>
1349 /// <param name="remoteClient"></param>
1350 protected internal void SpinStart(UUID objectID, IClientAPI remoteClient)
1351 {
1352 SceneObjectGroup group = GetGroupByPrim(objectID);
1353 if (group != null)
1354 {
1355 if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
1356 {
1357 group.SpinStart(remoteClient);
1358 }
1359 }
1360 }
1361
1362 /// <summary>
1363 /// Spin the given object
1364 /// </summary>
1365 /// <param name="objectID"></param>
1366 /// <param name="rotation"></param>
1367 /// <param name="remoteClient"></param>
1368 protected internal void SpinObject(UUID objectID, Quaternion rotation, IClientAPI remoteClient)
1369 {
1370 SceneObjectGroup group = GetGroupByPrim(objectID);
1371 if (group != null)
1372 {
1373 if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
1374 {
1375 group.SpinMovement(rotation, remoteClient);
1376 }
1377 // This is outside the above permissions condition
1378 // so that if the object is locked the client moving the object
1379 // get's it's position on the simulator even if it was the same as before
1380 // This keeps the moving user's client in sync with the rest of the world.
1381 group.SendGroupTerseUpdate();
1382 }
1383 }
1384
1385 /// <summary>
1345 /// 1386 ///
1346 /// </summary> 1387 /// </summary>
1347 /// <param name="primLocalID"></param> 1388 /// <param name="primLocalID"></param>