Not easily with the built in collision system that I know of. You’d need to check against the line2D using math in your script OR add a collision shape and node to your Line2D node.