-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Framed Camera in 2D that follows diagonal movements #372
Comments
There is an upcoming refactor task for Framed Follow in #161 that aims to solve things like this. |
Your proposal does seem to partly solve one of the main issues, so happy to add that in to alleviate the current approach until it can be fully looked at. |
Feel free to open a PR to add that small change in (if you want contribution credit); otherwise, I can add it in for the next release linking to this post. |
Actualizing _follow_framed_offset when on only one side of the frame.
It's my first time making a PR so I hope I didn't mess up. In any case, if the PR is messed up, you can add it in for the next release like you said. |
It all looks great, so no need to worry 🙂 Thanks for sharing the improvement! |
Believe the PR solved the problem this issue described, so closing it. If I misunderstood, please do let me know and can reopen this. |
Project Type
2D
Feature Description
Currently, when you get to a border of the frame in Framed mode for a PhantomCamera2D, the position of the canvas relative to the player will not change while you stay on the porder of the frame. This can lead to weird situations like going on the bottom right corner of the frame and, once you get there, even if you go in the bottom left direction, the camera will not go to the left.
Without the feature :
https://github.com/user-attachments/assets/10bd431a-e135-4785-a0f9-9270ea021931
With the feature :
https://github.com/user-attachments/assets/c094f64b-b621-43a3-be26-d82b57601818
Use Cases
The idea of the framed camera is that it follows the player's movement. In the current version of this addon, the camera will not always follow the player's movent if on the borders of the frame.
The behaviour desribed is what I was looking for when I downloaded the addon. I think it is one of the main points of the framed camera.
(Optional) Proposed Solution
Replacing the condition at line 600 of res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd by the following ones seems to work for me.
The text was updated successfully, but these errors were encountered: