Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Casper 1 · Mar 16, 2012 at 09:37 PM · linerenderertransparent texture

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/

alt text

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

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eric5h5 · Mar 18, 2012 at 07:52 PM 1
Share

I'd recommend Vectrosity (naturally)...for example, http://www.starscenesoftware.com/stuff/pics/vectrosity3.png

avatar image fafase · Mar 18, 2012 at 07:59 PM 0
Share

If you would not spend and help so much on this forum, I would almost say it looks like a spam. :)

avatar image Eric5h5 · Mar 18, 2012 at 08:05 PM 0
Share

That's why I posted as a comment and not an answer. ;)

avatar image Casper 1 · Mar 18, 2012 at 11:31 PM 0
Share

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.

avatar image Eric5h5 · Mar 18, 2012 at 11:58 PM 1
Share

http://www.starscenesoftware.com/vectrositydemo8.html

2 Replies

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Casper 1 · Mar 16, 2012 at 10:26 PM 0
Share

What shader would you recommend for the tiling?

By using the diffuse and this texture I got the line but in the wrong direction :-)

alt text

avatar image diddykonga · Mar 16, 2012 at 10:45 PM 0
Share

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

avatar image Casper 1 · Mar 18, 2012 at 07:41 PM 0
Share

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

avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges