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

iOS camera focus control (or auto-focus) #27

Open
vanoak opened this issue Jan 4, 2022 · 5 comments
Open

iOS camera focus control (or auto-focus) #27

vanoak opened this issue Jan 4, 2022 · 5 comments

Comments

@vanoak
Copy link

vanoak commented Jan 4, 2022

Hello,

First of all this is not an issue, the plugin works as expected.
I have a doubt though. Is it possible to change the camera focus ? Or enable auto-focus?
Thank you.

@vanoak vanoak changed the title iOS camera (auto-focus) control iOS camera focus control or (auto-focus) Jan 4, 2022
@vanoak vanoak changed the title iOS camera focus control or (auto-focus) iOS camera focus control (or auto-focus) Jan 4, 2022
@vanoak
Copy link
Author

vanoak commented Jan 10, 2022

Noticed this [p_device setFocusMode:AVCaptureFocusModeLocked]; in plugins/camera/camera_ios.mm (line 75).
Could it be the case of changing to continuousAutoFocus?

SOURCE: https://stackoverflow.com/questions/49541837/swift-autofocus-expose-and-continuousautofocus-exposure-at-the-same-time

@naithar
Copy link
Contributor

naithar commented Jan 11, 2022

It's possible to use AVCaptureFocusModeContinuousAutoFocus instead of AVCaptureFocusModeLocked, but it would change the way plugin works for everyone, since Godot's CameraFeed doesn't support any way to setup focus modes.

@vanoak
Copy link
Author

vanoak commented Jan 11, 2022

Alright, I think that can work for the project I'm working at the moment. I will try it tomorrow.

@vanoak
Copy link
Author

vanoak commented Jan 12, 2022

Hi again,

It works (just the continuous autofocus). I recompiled the xcframework (debug and the release) and duplicated the previous configuration.

Thank you @naithar.

@naithar
Copy link
Contributor

naithar commented Jan 12, 2022

@vanoak that's great news :)
I think plugin should provide the way to setup some parameters like focus, but I can't think of any way to add this configuration except for extending Godot's CameraFeed

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

No branches or pull requests

3 participants