-
-
Notifications
You must be signed in to change notification settings - Fork 108
Add an option to always process Phantom Camera on Idle ticks #536
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
Add an option to always process Phantom Camera on Idle ticks #536
Conversation
Related to the comment in the issue for this. Think it makes more sense to do this as a property in the It's also a lighter change, as the caller of the |
Feel free to set up the logic for the Otherwise, am happy to add it myself for the next release! |
Hey, I'll have this PR updated within the next day or so. Thanks for taking the time to read everything over, as well as provide the context with |
Hi @ramokz, I've just made an update that incorporates the enum. Please let me know if you have any questions. On your comment about the change being lighter:
In order to ensure that each Camera's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Don't think any changes to the phantom_camera_2d.gd
or phantom_camera_3d.gd
are needed, so think those can be reverted.
Reason being the inclusion of the flag _follow_target_physics_based
in the _process
and _physics_process
were added before the PCamHost
was set to call the active PCam
from within its _process
/ _physics_process
with the _tween_follower_checker()
. Which gets called before the first Camera2D/3D
tick happens when it's about to tween to the next PCam
. So the physics processes inside phantom_camera_2d.gd
/ phantom_camera_3d.gd
, in practice, do not really do anything.
So am I am likely going to remove the _physics_process
call in the phantom_camera_2d.gd
/ phantom_camera_3d.gd
scripts altogether along with the usage of _follow_target_physics_based
inside the conditional in the _process
as it is effectively not needed anymore.
Don't worry about this for the PR, it's just to provide some context!
addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks for raising the issue and for the PR submission 🎉
This change addresses an issue I've been encountering in #535, where I've enabled physics interpolation but still want to process Phantom Camera on idle updates.
To address this, I've added an option called
always_process_on_idle
, which prevents Phantom Camera from switching to processing on physics updates. I've put this option in the Advanced Settings, as its a bit of a I know what I'm doing™️ button.Please let me know if there are any edits I should make, or if the logic should be restructured.