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

_on_phantom_camera_2d_tween_completed': Method not found. #324

Closed luiscesjr closed 2 months ago

luiscesjr commented 3 months ago

Issue description

Hi everyone, I'm on the latest plugin release and on Godot 4.2.2

While trying to achieve some kind of animation effect with the camera target tween, I was struck by this bug. At boot, the editor prints the following:

core/object/object.cpp:1140 - Error calling from signal 'tween_completed' to callable: 'Node2D(mapa.gd)::_on_phantom_camera_2d_tween_completed': Method not found.

But the signal is correctly connected, and it even works the first time it's called. The issues start to appear when I try to change focus again mid game, the camera does change focus but no tween occurs and also the completed method is never called again.

Its a simple method inside the complete, but that's not the issue since it's not getting called.

Don't know if it's related but I also occasionally get an error in the console saying I should not have more than one camera server... But I don't, I have only one =)

image

I also tried changing the method's name, was worth a shot but same results: (Changed both on call and on code)

core/object/object.cpp:1140 - Error calling from signal 'tween_completed' to callable: 'Node2D(mapa.gd)::_on_phcam_tween_finished': Method not found.

Steps to reproduce

Connect the tween completed signal and try changing focus more than once.

(Optional) Minimal reproduction project

No response

ramokz commented 3 months ago

Can't seem to replicate the issue, so something strange is going on.

https://github.com/ramokz/phantom-camera/assets/5159399/fa3d7070-039e-4051-8096-251c18afeec7

Would you be able to share a code sample or a minimal-reproducible-project (MRP)? Can have a look and see if it's a setup thing.

luiscesjr commented 2 months ago

Sorry for the long time to reply, I could not replicate this in any other project, it happens in this one in particular.

I'm not sure what exactly is causing this issue on PhantomCamera in this project, but since it seems specific, if you'd like to close the issue for now, it's alright!

The project is a mess, it's a gamejam game, but if you'd really like to see it let me know!