ATC functionality - capture touchdrag, move object along it?

Hello again!

Thanks for the help last time!

I posted a while back about a game I have in mind and I have a few more questions that I’ve love some direction or help with; I figured I’d toss it out here. I’d like to capture a touch and use it to draw a pretty (GUI element, sprite, FX, model?) line on screen that can influence other objects on screen. Kind of like air traffic controller.

Does anyone have any specifics on how to do these 3 things? I’ve been through the script for the touchphases demo but it’s difficult to break it down into just the items I need:

  1. capture a touch and store it until another touch is used
  2. draw a pretty graphic along it, say like a stream of water
  3. Use the pretty line to influence things that contact it

Thanks again!

Have you looked at the drawing example that you can download for XCode through the iPhone Dev Center?

It shows you how to draw colorful lines using OpenGL. It’s not written for Unity but you may could look at it to get some ideas on what to do.

Thanks for your reply!

I’ll give that a look. I think I may have found an answer in something called a “line renderer” which seems to have most of the functionality I was asking this forum about. I’ll see if it will work and post here if it does.