ramokz / phantom-camera

👻🎥 Control the movement and dynamically tween 2D & 3D cameras. Built for Godot 4. Inspired by Cinemachine.
https://phantom-camera.dev/
MIT License
1.97k stars 65 forks source link

FOV set on PhantomCamera3D at runtime not being set on Camera3D #183

Closed Zaphodious closed 6 months ago

Zaphodious commented 6 months ago

Issue description

When setting FOV via PhantomCamera3D.set_camera_fov(), the actual camera's FOV does not change like it would when changing the camera's .fov property directly.

If the "if" checks at phantom_camera_host.gd lines 286 and 288 are changed to always pass, then changing the FOV works as expected at runtime. (Maybe relevant: as PhantomCamera3D.set_camera_fov() always nulls out the current _camera_3D_resource if one exists, it seems like the check at 288 will never pass even though the values its getting are being provided by _camera_3D_resouce_default.)

Steps to reproduce

  1. Call .set_camera_fov() on the active PhantomCamera3D node at runtime with a value different then the camera's current FOV

(Optional) Minimal reproduction project

phantomcamera_fov_mrp.zip

ramokz commented 6 months ago

Thanks for reporting this!

Have published a PR (#184), should resolve the issue.

Zaphodious commented 6 months ago

Excellent! I tested the change and it seems to work. Thank you! :)