mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
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.)
This commit is contained in:
@@ -132,6 +132,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public event SceneGroupGrabed OnSceneGroupGrab;
|
||||
|
||||
public delegate bool SceneGroupSpinStarted(UUID groupID);
|
||||
|
||||
public event SceneGroupSpinStarted OnSceneGroupSpinStart;
|
||||
|
||||
public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation);
|
||||
|
||||
public event SceneGroupSpun OnSceneGroupSpin;
|
||||
|
||||
public delegate void LandObjectAdded(ILandObject newParcel);
|
||||
|
||||
public event LandObjectAdded OnLandObjectAdded;
|
||||
@@ -381,6 +389,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
private StopScript handlerStopScript = null; //OnStopScript;
|
||||
private SceneGroupMoved handlerSceneGroupMove = null; //OnSceneGroupMove;
|
||||
private SceneGroupGrabed handlerSceneGroupGrab = null; //OnSceneGroupGrab;
|
||||
private SceneGroupSpinStarted handlerSceneGroupSpinStarted = null; //OnSceneGroupSpinStart;
|
||||
private SceneGroupSpun handlerSceneGroupSpin = null; //OnSceneGroupSpin;
|
||||
private LandObjectAdded handlerLandObjectAdded = null; //OnLandObjectAdded;
|
||||
private LandObjectRemoved handlerLandObjectRemoved = null; //OnLandObjectRemoved;
|
||||
private AvatarEnteringNewParcel handlerAvatarEnteringNewParcel = null; //OnAvatarEnteringNewParcel;
|
||||
@@ -636,6 +646,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TriggerGroupSpinStart(UUID groupID)
|
||||
{
|
||||
handlerSceneGroupSpinStarted = OnSceneGroupSpinStart;
|
||||
|
||||
if (handlerSceneGroupSpinStarted != null)
|
||||
{
|
||||
return handlerSceneGroupSpinStarted(groupID);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TriggerGroupSpin(UUID groupID, Quaternion rotation)
|
||||
{
|
||||
handlerSceneGroupSpin = OnSceneGroupSpin;
|
||||
|
||||
if (handlerSceneGroupSpin != null)
|
||||
{
|
||||
return handlerSceneGroupSpin(groupID, rotation);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void TriggerGroupGrab(UUID groupID, Vector3 offset, UUID userID)
|
||||
{
|
||||
handlerSceneGroupGrab = OnSceneGroupGrab;
|
||||
|
||||
Reference in New Issue
Block a user