Draw lines as static

Is it possible to use the lines i draw with the shape painter as a physics2 objects? For example, to make a ball roll on the lines.

I don’t think so. Maybe you can try something like this:

Have you tried adding a physics 2 behaviour (with the physics shape set to ‘edge’) to the shape painter and creating a new shape painter instance for every line segment. You’d have to look at something like a weld joint to connect 2 consecutive lines.

Otherwise you may be able to fake it - create a 1x1 white sprite object, and instead of drawing a line, create an instance of this sprite, scale and rotate it so it covers where the line should be. Again, you’d have to add physics 2 behaviour with the edge set to shape and to use something like a weld joint to connect two consecutive lines.