I am trying to have a ball roll on a line that was drawn from a Line Renderer.
Is there a way I can have a box collider that follows the line, because I have 2 points with the line and the line moves when the points move. Is there a way to have a box collider follow the line, and so that a ball can roll on it?
Whether a ball will roll, slide, or bounce down an inclined collider will depend on Unity’s Physics2D implementation, the physic material you give bot colliders (ball and incline), and any other forces you might apply (like torque). This should be quick and easy for you to test and develop. The code at the following link resizes a game object between two other Transforms and can easily be rewritten to use two Vector3s instead. Apply it to an empty game object with a box collider and a localScale of (0.01, 1, 1).