i added the script in the camer a ,, but how to like keep the bakground static , i mean the camera script should not efefct the texturerect
this is the script ```extends Node
var camera: Camera2D
var zoom_speed = 0.1
var min_zoom = -5
var max_zoom = 2.0
func _ready():
camera = Camera2D.new()
add_child(camera)
camera.make_current()
#func _ready():
#camera = Camera2D.new()
#add_child(camera)
#camera.make_current()
#camera.limit_left = 0
#camera.limit_top = 0
#camera.limit_right = 1920 # Match your viewport width
#camera.limit_bottom = 1080
func _input(event):
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_WHEEL_UP:
camera.zoom = Vector2.ONE * min(camera.zoom.x + zoom_speed, max_zoom)
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
camera.zoom = Vector2.ONE * max(camera.zoom.x - zoom_speed, min_zoom)