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 saygon · Feb 27, 2013 at 10:33 PM · smoothingvectrosity

Vectrosity line smoothing issue.

Hi, I am using Vectrosity for drawing and I have some unexpected behaviour when try to draw symmetric smooth line. I have 5 points - two exteme points (center of 2 spheres), two "neighbors" of extreme points and middle point. I want to draw something like this:

![alt text][1]

I created 5 points, and array with 4 width values.

When I draw line without smoothing, all is ok: But when I enabled smoothing (line.smoothWidth), line began to draw wrong: (2 - middle point is ok, 1 point is ok, 3 point - wrong). Please see the picture:

![alt text][2]

I am sure that all point positions are correctly (I created sphere object in this points and all looks like on picture without smoothing - I mean that all poins on their place).

Here is my code:

 //create line
 VectorLine line = new VectorLine("Line", new Vector3[]
             {
                 new Vector3(0, 0, 0), //first exteme point
                 new Vector3(0, 0, 0), //segment near first exteme point
                 new Vector3(0, 0, 0), //middle point
                 new Vector3(0, 0, 0), //segment near second exteme point
                 new Vector3(0, 0, 0)  //second exteme point
             },
             Color.black,
             null,
             getLineMaxDynamicsWidth(),
             LineType.Continuous);
 
 .........................
 ...Update point positions...
 .......................                  
 //update width
 float width = 40;
 var widths = new float[] { width , width/2f, width/2f, width};
 Vector.SetWidths(line, widths);
 line.smoothWidth = true;
 Vector.Active(line, true);
 Vector.DrawLine3D(line);

 

I am using Vectrosity 1.4.2.

Can you please help me with this issue? [1]: /storage/temp/8350-whatiwanttodraw.png [2]: /storage/temp/8352-vectrositywithandwithoutsmoothing.png

whatiwanttodraw.png (3.6 kB)
vectrositywithandwithoutsmoothing.png (58.4 kB)
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Eric5h5 · Feb 27, 2013 at 10:50 PM

Lines are smoothed from one point to the next, so it should do what you want if you add another point.

Comment
Add comment · Show 2 · 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 saygon · Feb 28, 2013 at 08:41 AM 0
Share

I am not sure that I understand your answer. Where I should add point?

I want to get symmetric line and use next points and widths for this:

1point----(width)----2point-----(width/2)----3point(middle)----(width/2)----4point----(width)----5point

avatar image Eric5h5 · Feb 28, 2013 at 02:49 PM 0
Share

Add a point between point 2 and point 3.

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

10 People are following this question.

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

Related Questions

Multiplayer: jitter caused by camera? by smoothing? 2 Answers

Disable terrain smoothing 0 Answers

Rigidbody 2d smooth movement problem (It's jerky) 1 Answer

Create 'Tippex' for a drawn line. 1 Answer

Different views for graph plotting 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