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
2.17k stars 71 forks source link

Fixed auto_follow_distance #276

Closed TCROC closed 5 months ago

TCROC commented 5 months ago

I was following the v7.0 branch. I saw it got merged into master so I synced my fork with master. I noticed there was a large refactor before merging in and it appears the correct assignment of "distance" was replaced with an incorrect assignment of "follow_distance". Fortunately I have the old v7.0 branch cached on my fork. You can see it here: https://github.com/Lange-Studios/phantom-camera/blob/dc3961faab3bdbd3d04790db49091d7601c93dfc/addons/phantom_camera/scripts/phantom_camera/phantom_camera_3D.gd#L580

Also, you can test the example follow group and see that auto follow distance is broken.

Thanks for the awesome asset btw! This was a simple fix :)

TCROC commented 5 months ago

Good catch! Hadn't noticed this.

Think the change also needs to happen in the clamp method?

It does! I'll add that in there :)

TCROC commented 5 months ago

@ramokz Fixed :)

TCROC commented 5 months ago

LGTM!

Thanks for finding and submitting a fix :)

Absolutely! Glad to help! :) ❤️