Camera fixes follow-up (#5703)
* allow unconstrained camera when tracking transform and fix some camera interpolation issues Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * tests for interpolation fixes Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * add test for camera constraints change Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * updates following review feeedback Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9f9aa8f2a6
commit
593f03efb4
@@ -1675,6 +1675,12 @@ void SandboxIntegrationManager::GoToEntitiesInViewports(const AzToolsFramework::
|
||||
if (auto viewportContext = viewportContextManager->GetViewportContextById(viewIndex))
|
||||
{
|
||||
const AZ::Transform cameraTransform = viewportContext->GetCameraTransform();
|
||||
// do not attempt to interpolate to where we currently are
|
||||
if (cameraTransform.GetTranslation().IsClose(center))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const AZ::Vector3 forward = (center - cameraTransform.GetTranslation()).GetNormalized();
|
||||
|
||||
// move camera 25% further back than required
|
||||
|
||||
Reference in New Issue
Block a user