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

Cannot set "follow_mode" (from c#) #304

Closed jjolmo closed 4 months ago

jjolmo commented 4 months ago

Issue description

I'm trying to set the "follow_mode" to be 0 or 2. My plan is to have a button to disable following some scene. So I'm using this:

GetNode("PhantomCamera2D").Call("follow_mode", 0);

But I get this error: ERROR: Invalid call. Nonexistent function 'follow_mode' in base 'Godot.Node2D'.

I can call other functions like "set zoom"

        Game.server.room.GetNode("PhantomCamera2D").Call("set_zoom", zoom);

but for some reason doesn't work with follow_mode

Steps to reproduce

Create a c#, call "follow_mode" from code

(Optional) Minimal reproduction project

No response

ramokz commented 4 months ago

This is an intentional design limitation rather than a bug. Basically, you cannot change the follow_mode via code during runtime.

There's more info on the documentation page about this.