- Home /
LineRenderer draw every second line
Hello
So I have a LineRenderer and a array with positions that my LineRenderer should use, but I only want to draw every second position since the rest of them should be transparent (Or not be there at all)
It is like angry birds, or this game: http://www.onlinegames.com/basketball/
I'm not sure if I should even use LineRenderer or something completely different so any suggestions is appreciated.
Cheers
Edit: This seems like its a 2D game but it is not, its 3D. The positions are Vector3s
I'd recommend Vectrosity (naturally)...for example, http://www.starscenesoftware.com/stuff/pics/vectrosity3.png
If you would not spend and help so much on this forum, I would almost say it looks like a spam. :)
Is there a demo for the picture you posted? Vectrosity seems to be what I need, but I kinda want to test it out before spending money on it.
Answer by rutter · Mar 16, 2012 at 09:46 PM
You can apply a custom material to your line renderer -- for example, you could use a material with a tiling texture to draw a "dotted" line.
What shader would you recommend for the tiling?
By using the diffuse and this texture I got the line but in the wrong direction :-)
Well if your going for the same dotted line as angry birds, i would just find a small white dot with a transparent background and use that as the tiled texture, and you can change the tiling values in the material
I think the problem is that the material for the LineRenderer applies to the whole line drawn (Every position) and not to one position so using your suggestion the line is drawn as this: (With this texture http://peecee.dk/uploads/032012/Test2.png) http://peecee.dk/uploads/032012/Result.jpg
Answer by Tekksin · Aug 12, 2014 at 10:03 PM
Just instantiate a dot every +/- ~.2 seconds at transform.position by using a script attached to the projectiles. This has nothing to do with the line renderer.
Your answer
Follow this Question
Related Questions
Trajectory for an angry birds like game 0 Answers
Obtaining pixels from line renderer 0 Answers
two linerenderer bug 0 Answers
Lerp Never Reaches Target 2 Answers
Draw shortest distance between 2 points on a sphere 1 Answer