Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor, fix and feat: Camera Rotation Handling + setCameraRotation Function #125

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ki2lian
Copy link

@Ki2lian Ki2lian commented Nov 28, 2024

  1. Refactor to Simplify Code:

    • Added two new utility functions, updateFollowCamRotation and updateFollowCamPosition, to encapsulate camera position and rotation updates. These functions are used in multiple places to reduce code duplication and improve maintainability.
  2. Fix rotateCamera Behavior:

    • Resolved an issue where rotateCamera incorrectly applied incremental adjustments to the camera's rotation (e.g., adding to the existing rotation). This fix ensures the function behaves as intended.
  3. New setCameraRotation Functionality:

    • Introduced the setCameraRotation function to allow explicit control over the camera's rotation. Unlike rotateCamera, this function directly sets the rotation to the specified values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant