Skip to content

Commit

Permalink
Merge pull request #1605 from Michael0933/CAMERA_LookProcess
Browse files Browse the repository at this point in the history
[CAMERA]: Update CAMERA_LookProcess
  • Loading branch information
Michael0933 authored Apr 11, 2024
2 parents cd93f25 + 38e7b32 commit e2450f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions KAIN2/Game/CAMERA.C
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ void CAMERA_SetLookFocusAndDistance(struct Camera* camera, VECTOR* focuspoint, i
Camera_lookDist = distance;
}

void CAMERA_LookProcess(struct Camera* camera) // Matching - 99.90%
void CAMERA_LookProcess(struct Camera* camera) // Matching - 100%
{
struct _Instance* focusInstance;
int smooth;
Expand Down Expand Up @@ -3073,7 +3073,7 @@ void CAMERA_LookProcess(struct Camera* camera) // Matching - 99.90%
if (camera->flags & 0x800)
{
camera->focusDistance = camera->targetFocusDistance;
CAMERA_Copy_Pos_To_Pos(&camera->targetFocusPoint, &camera->focusPoint);
SET_VEC((struct _SVector*)&camera->focusPoint, &camera->targetFocusPoint);
}
else
{
Expand All @@ -3086,9 +3086,9 @@ void CAMERA_LookProcess(struct Camera* camera) // Matching - 99.90%
CriticalDampAngle(1, &camera->focusRotation.z, camera->targetFocusRotation.z, &camera->focusRotVel.z, &camera->focusRotAccl.z, 64);
CriticalDampAngle(1, &camera->focusRotation.x, camera->targetFocusRotation.x, &camera->focusRotVel.x, &camera->focusRotAccl.x, 64);
CAMERA_CalcPosition(&camera->targetPos, &camera->focusPoint, &camera->focusRotation, camera->focusDistance);
CAMERA_Copy_Pos_To_Pos(&camera->targetPos, &camera->core.position);
CAMERA_Copy_Rot_To_Rot(&camera->focusRotation, &camera->targetRotation);
CAMERA_Copy_Rot_To_Rot(&camera->targetRotation, &camera->core.rotation);
SET_VEC((struct _SVector*)&camera->core.position, &camera->targetPos);
SET_VEC((struct _SVector*)&camera->targetRotation, (struct _Position*)&camera->focusRotation);
SET_VEC((struct _SVector*)&camera->core.rotation, (struct _Position*)&camera->targetRotation);
camera->distanceState = 0;
camera->lagZ = camera->core.rotation.z;
CAMERA_CalculateLead(camera);
Expand Down

0 comments on commit e2450f6

Please sign in to comment.