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 ziomagica · Jun 07, 2012 at 02:32 AM · vectrosity

Vectrosity line with arrow

I'm currently trying to create an editor allowing the user to make a tree graph by creating nodes and edges. Right now I'm using Vectrosity to draw out the edges and it's working great. But as it is intended to be a directed graph, it would be visibly more intuitive if the edges had an arrow to indicate direction.

Is there any way to draw arrows with Vectrosity or otherwise?

alt text

GraphScreenshot.jpg (46.6 kB)
Comment
Add comment · Show 3
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 kolban · Jun 07, 2012 at 03:03 AM 0
Share

What is "Vectrosity"?

avatar image Berenger · Jun 07, 2012 at 03:12 AM 0
Share

http://starscenesoftware.com/vectrosity.html

avatar image ziomagica · Jun 07, 2012 at 03:14 AM 0
Share

It's a great line-drawing tool on the asset store, you might want to check it out if you want lines in your game

http://starscenesoftware.com/vectrosity.html

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Eric5h5 · Jun 07, 2012 at 03:27 AM

You could use some kind of arrow texture along with SetTextureScale, so the lines would look something like this:

alt text

Comment
Add comment · Show 6 · 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 ziomagica · Jun 07, 2012 at 07:26 AM 0
Share

Trying out this idea, but pretty bad at art stuffs so not too sure how to set textures and stuff.

I'm using this now:

// copied this off the default material from Vectrosity

$$anonymous$$aterial mat = new $$anonymous$$aterial("Shader \"Vertex Colors/Alpha\" {Category{Tags {\"Queue\"=\"Transparent\" \"IgnoreProjector\"=\"True\" \"RenderType\"=\"Transparent\"}SubShader {Cull Off ZWrite On Blend SrcAlpha One$$anonymous$$inusSrcAlpha Pass {BindChannels {Bind \"Color\", color Bind \"Vertex\", vertex}}}}}");

mat.SetTexture("_$$anonymous$$ainTex", arrowTexture);

VectorLine newEdge = new VectorLine("Edge", points, Color.cyan, mat, 5f, LineType.Discrete);

newEdge.SetTextureScale(1.0f);

newEdge.Draw3DAuto();

So far I'm not seeing the texture, a normal line is still being drawn. I must be doing something wrong with setting the texture, can anyone help please?

avatar image Eric5h5 · Jun 07, 2012 at 07:57 AM 0
Share

Create the material in Unity, make a public variable for the material, drag the material you made onto the appropriate slot in the inspector, and use that variable when creating the VectorLine. See any of the examples that use dot/dashed lines.

avatar image clfischer · Jul 04, 2012 at 02:54 PM 0
Share

Did this work for you? I'm trying to achieve something similar but the texture always gets stretched and blurred.

avatar image Eric5h5 · Jul 04, 2012 at 11:09 PM 0
Share

Use SetTextureScale.

avatar image clfischer · Jul 05, 2012 at 09:40 AM 0
Share

Thanks Eric. I've tried this but the result isn't what I expect. It's as if one column of pixels gets repeated but not the rest of the texture. Either my arrow still appears only once in each segment, or it appears in the first segment and all the following segments are either single or triple lines. I need to get some pics up on my other post to illustrate.

Show more comments

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

Vectrosity object rotation 0 Answers

Vectrosity line thickness different with cam zoom. 0 Answers

Setting transform parents to Vectrosity canvases. 1 Answer

Viewing Vectrosity lines from multiple cameras 1 Answer

Using Vectrosity, I want to make a curve. 0 Answers


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