Godot Version
4.3
Question
i made a input,while event is mouse button left ,it could help player drag camera.when i run it ,it actually can drag camrea,but just 1s, the func _draw() drawed picture lost,i cant see the picture.
but if i use extends node2d ,i can run it noproblem,will not lost picture
who can help me
that is one cryptic piece of text.
for interaction with UI elements use controls. for interaction with in game elements like some box, use the CollisionObject2Ds signals and methods (any node inherited from this, like Area2D)
draw only runs when an object is drawn. this is more efficient. you need to manually update with queue_redraw()
to run draw again. this does not affect changing the node position, but does affect anything done when overriding the draw method.
I’m sorry, what is the problem? because it sounds like you solved it?