Compensate camera-at and camera-eye for child prim rotation when sitting on child prim with camera-eye set
parent
174df94172
commit
fbed245596
|
@ -2764,7 +2764,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
|
cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
|
||||||
|
|
||||||
if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero)
|
if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero)
|
||||||
|
{
|
||||||
|
if (!part.IsRoot)
|
||||||
|
{
|
||||||
|
cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
|
||||||
|
cameraAtOffset = part.OffsetPosition;
|
||||||
|
}
|
||||||
|
|
||||||
cameraEyeOffset += 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();
|
forceMouselook = part.GetForceMouselook();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue