Compensate camera-at and camera-eye for child prim rotation when sitting on child prim with camera-eye set

bullet-2.82
Justin Clark-Casey (justincc) 2014-05-23 01:34:02 +01:00
parent 174df94172
commit fbed245596
1 changed files with 12 additions and 0 deletions

View File

@ -2764,7 +2764,19 @@ namespace OpenSim.Region.Framework.Scenes
cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero)
{
if (!part.IsRoot)
{
cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
cameraAtOffset = part.OffsetPosition;
}
cameraEyeOffset += part.OffsetPosition;
}
// m_log.DebugFormat(
// "[SCENE PRESENCE]: Using cameraAtOffset {0}, cameraEyeOffset {1} for sit on {2} by {3} in {4}",
// cameraAtOffset, cameraEyeOffset, part.Name, Name, Scene.Name);
forceMouselook = part.GetForceMouselook();