on sit use root prim camera at and eye if child as neither
parent
f6af5f4996
commit
8808549669
|
@ -2705,13 +2705,21 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
sitOrientation = part.RotationOffset * sitOrientation;
|
||||
offset = offset * part.RotationOffset;
|
||||
cameraAtOffset = cameraAtOffset * part.RotationOffset;
|
||||
cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
|
||||
|
||||
offset += part.OffsetPosition;
|
||||
|
||||
if (CameraAtAxis == Vector3.Zero && cameraEyeOffset == Vector3.Zero)
|
||||
{
|
||||
CameraAtAxis = part.ParentGroup.RootPart.GetCameraAtOffset();
|
||||
cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
|
||||
}
|
||||
else
|
||||
{
|
||||
cameraAtOffset = cameraAtOffset * part.RotationOffset;
|
||||
cameraAtOffset += part.OffsetPosition;
|
||||
cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
|
||||
cameraEyeOffset += part.OffsetPosition;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ControllingClient.SendSitResponse(
|
||||
|
@ -2845,14 +2853,23 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
Orientation = part.RotationOffset * Orientation;
|
||||
offset = offset * part.RotationOffset;
|
||||
cameraAtOffset = cameraAtOffset * part.RotationOffset;
|
||||
cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
|
||||
|
||||
offset += part.OffsetPosition;
|
||||
|
||||
if (CameraAtAxis == Vector3.Zero && cameraEyeOffset == Vector3.Zero)
|
||||
{
|
||||
CameraAtAxis = part.ParentGroup.RootPart.GetCameraAtOffset();
|
||||
cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
|
||||
}
|
||||
else
|
||||
{
|
||||
cameraAtOffset = cameraAtOffset * part.RotationOffset;
|
||||
cameraAtOffset += part.OffsetPosition;
|
||||
cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
|
||||
cameraEyeOffset += part.OffsetPosition;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
m_pos = offset;
|
||||
|
||||
ControllingClient.SendSitResponse(
|
||||
|
|
Loading…
Reference in New Issue