mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
set optional group position and rotation before attach to scene
This commit is contained in:
@@ -388,19 +388,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public bool AddNewSceneObject(
|
||||
SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel)
|
||||
{
|
||||
AddNewSceneObject(sceneObject, attachToBackup, false);
|
||||
|
||||
if (pos != null)
|
||||
sceneObject.AbsolutePosition = (Vector3)pos;
|
||||
|
||||
if (rot != null)
|
||||
sceneObject.UpdateGroupRotationR((Quaternion)rot);
|
||||
|
||||
AddNewSceneObject(sceneObject, attachToBackup, false);
|
||||
|
||||
if (sceneObject.RootPart.Shape.PCode == (byte)PCode.Prim)
|
||||
{
|
||||
sceneObject.ClearPartAttachmentData();
|
||||
}
|
||||
|
||||
if (rot != null)
|
||||
sceneObject.UpdateGroupRotationR((Quaternion)rot);
|
||||
|
||||
PhysicsActor pa = sceneObject.RootPart.PhysActor;
|
||||
if (pa != null && pa.IsPhysical && vel != Vector3.Zero)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user