I tried using ColliisionShape2D.Disable = true; Didnt work for me.

bool disabled set_disabled(value) setter is_disabled() getter

A disabled collision shape has no effect in the world.

func _physics_process(delta):
	
	var col = get_node("CameraPosition/Area2D/CollisionShape2D")
	col.set_disabled(true)
	print(col.is_disabled())
note ¹ I quickly set it up in a cameraController scene of mine, hence the CameraPosition in the tree.

@Megalomaniak said:

bool disabled set_disabled(value) setter is_disabled() getter

A disabled collision shape has no effect in the world.

func _physics_process(delta):
	
	var col = get_node("CameraPosition/Area2D/CollisionShape2D")
	col.set_disabled(true)
	print(col.is_disabled())
note ¹ I quickly set it up in a cameraController scene of mine, hence the CameraPosition in the tree.

hey, thanks for the reply. Does it have to be inside physicsProcess because it is not working for me

@Anderoo99 said:

@Megalomaniak said:

bool disabled set_disabled(value) setter is_disabled() getter

A disabled collision shape has no effect in the world.

func _physics_process(delta):
	
	var col = get_node("CameraPosition/Area2D/CollisionShape2D")
	col.set_disabled(true)
	print(col.is_disabled())
note ¹ I quickly set it up in a cameraController scene of mine, hence the CameraPosition in the tree.

hey, thanks for the reply. Does it have to be inside physicsProcess because it is not working for me

Update: It does work for me. I was using CallDeffered and the parameter I gave was SetDisabled (c#) instead of set_disabled (gdScript). Thanks for the response :-)

3 years later