Merge pull request #395 from SHADE-DP/SP3-141-Camera-System
Camera arm target offset rotation fix
This commit is contained in:
commit
367c1fc77e
|
@ -272,6 +272,13 @@ namespace SHADE
|
||||||
if (arm->isActive == true)
|
if (arm->isActive == true)
|
||||||
{
|
{
|
||||||
camera.offset = arm->GetOffset();
|
camera.offset = arm->GetOffset();
|
||||||
|
|
||||||
|
SHVec3 tOffset = arm->GetTargetOffset();
|
||||||
|
|
||||||
|
|
||||||
|
tOffset = SHVec3::RotateY(tOffset, SHMath::DegreesToRadians(arm->GetYaw()));
|
||||||
|
|
||||||
|
|
||||||
if (arm->lookAtCameraOrigin)
|
if (arm->lookAtCameraOrigin)
|
||||||
CameraLookAt(camera, camera.position + arm->GetTargetOffset());
|
CameraLookAt(camera, camera.position + arm->GetTargetOffset());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue