"Bubble Shooter Style" Aiming in 2D

I need to be able to draw a line from a gameobject that goes off infinitely (or to a really large point) and is aimed with a mouse, kind of like a bubble shooter game. I’ve been looking everywhere and none of the LineRenderer or Raycast2D tutorials really help me with this. Also, if I were drag and aim as if it were on mobile, how would I go about doing that?

EDIT: This is the style of what I need http://answers.unity3d.com/storage/temp/89092-screen-shot-2017-03-01-at-123945-pm.png

The asset store has a great package called Vectrosity that can get you drawing good-looking lines in no time at all.

As for the rest of the interactivity of a real game, I suggest you start here: Learn

I’ve heard so much about Vectrosity but I’m not sure if it would be too much of use to me. All I want to do is simply make an aim line from an object. Can you show me what a line of code in Vectrosity would look like if I were to achieve my goal?

The Vectrosity API is a much-refined version of what Unity’s LineRenderer component is: you give it an array of points, tell it some other parameters, and presto it makes the line appear for you.

You could also iteratively put a series of sprites in a line like that, bouncing off the wall, etc. That might be easier.

Gotcha. You don’t think there is a more efficient way of doing this?

I wouldn’t worry about efficiency until I have something actually working. Unity won’t break a sweat doing a bubble shooter unless you make some really grievous errors, most of which have been documented by those who went before you.

True. Although, I’ll continue to look for other solutions for a bit before I drop 30 bucks on this. I’ll use Vectrosity as a last resort.