Skip to content

Commit

Permalink
Optimize third person camera settings and calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
kwbm authored and hyv1001 committed Apr 7, 2022
1 parent a0e2f6e commit 13422d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"parameter": {
"$context":{
"fov": 89,
"fov": 70,
"horizontal_offset":3,
"vertical_offset":2
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace Pilot

parent_transform->setRotation(q_yaw * parent_transform->getRotation());

Vector3 center_pos = parent_transform->getPosition() + Vector3::UNIT_Z * 0.5f;
Vector3 center_pos = parent_transform->getPosition() + Vector3::UNIT_Z * vertical_offset - 0.5f;
Vector3 camera_pos =
parent_transform->getRotation() * para->m_cursor_pitch * offset + parent_transform->getPosition();
Vector3 camera_forward = center_pos - camera_pos;
Expand Down

0 comments on commit 13422d9

Please sign in to comment.