0 votes

I am building an add-on that requires the editor's camera. Using position every frame made the result I want look laggy. So I figured that I could use a signal that activates every time the camera's transform changes. There is a notification called NOTIFICATION_TRANSFORM_CHANGED. I thought could somehow use notifications with signals. But how?

in Engine by (3,912 points)
recategorized by

1 Answer

0 votes

Have you tried observing your camera transform via connect? E.g.

func _cam_transform(data):
     ... do something ..

func _ready():
    var res=$MyCamera.connect("NOTIFICATION_TRANSFORM_CHANGED", self, "_cam_transform",["Cam Transform data"])
by (805 points)


Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.