Camera arm target offset rotation fix

This commit is contained in:
maverickdgg 2023-03-05 10:55:39 +08:00
parent e75b20f36b
commit ef0ff801e4
1 changed files with 7 additions and 0 deletions

View File

@ -272,6 +272,13 @@ namespace SHADE
if (arm->isActive == true)
{
camera.offset = arm->GetOffset();
SHVec3 tOffset = arm->GetTargetOffset();
tOffset = SHVec3::RotateY(tOffset, SHMath::DegreesToRadians(arm->GetYaw()));
if (arm->lookAtCameraOrigin)
CameraLookAt(camera, camera.position + arm->GetTargetOffset());