Search Unity

Vectrosity - fast and easy line drawing

Discussion in 'Assets and Asset Store' started by Eric5h5, May 26, 2010.

Thread Status:
Not open for further replies.
  1. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    It's better with one VectorLine because then you have one draw call instead of more than one, but probably not worth worrying about unless you have really a lot of splines. (Although in that case it might not be possible to put them all in one VectorLine anyway due to mesh limitations.)

    --Eric
     
  2. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    Hi Eric,

    I'm having some success, but hit a wall. I am creating a List of Splines created, and then trying to iterate through it, it works but I only ever see the last spline in the List. Looking the other splines look fine in the inspector. I suspect it's something about Draw3D that I am not understanding. Here is what I am doing:

    Code (csharp):
    1.  
    2. var splineList : List.<VectorLine>;
    3.  
    4. //...blah creating splines, adding to splineList....
    5.  
    6. //Then I try to iterate through them all...
    7.  
    8.     if(splineList.Count > 0){
    9.         for(var thisSpline in splineList)
    10.         {
    11.             thisSpline.Draw3D();
    12.         }
    13.     }
    14.  
    It's like Draw3D will only display the last spline that it received. Any ideas?
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    I'd have to see more code, since there's nothing specific about what you posted that would cause problems.

    --Eric
     
  4. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    Well I am nearly there. All splines are showing at the same time. The problem I face now is that old splines are not being destroyed and it starts to get messy very quickly.

    I am trying to remove them before the next cycle of calculations like this:

    Code (csharp):
    1.  
    2.         for(var i: int = 0; i< splineList.Count; i++)
    3.         {
    4.             splineList[i].Destroy (spline);
    5.             print(splineList[i].name);
    6.         }
    7.  
    But I still get a massive amount of splines being created. In the if statement I check to see if I can see the name of the spline to see if it is still there, and it is.

    Any suggestions Eric? I'm doing my best not to just dump a load of code on you ;)

    Edit: I have found that doing the following works:
    Code (csharp):
    1.  
    2.         for(var i : int = 0; i < splineList.Count; i++)
    3.         {
    4.             Destroy(GameObject.Find("Vector " + splineList[i].name));
    5.         }
    6.  
    I have a feeling that using GameObject.Find is not as efficient as using Destroy (spline).

    Is this method OK Eric? Or would correct use of Destroy (spline) be better?
     
    Last edited: Jan 16, 2014
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    You definitely don't want to use UnityEngine.Destroy with Vectrosity, since it won't get rid of the VectorLine, only the GameObject that was created. Use VectorLine.Destroy, as in "VectorLine.Destroy (myLine)", since it's a static function.

    --Eric
     
  6. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    Hi Eric,

    In the example above I try to use splineList.Destroy (spline); but that does not seem to work. Not sure what I can do after that. Does it look like it should work? Thanks!
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    You need to use "VectorLine.Destoy (line)", specifically. It's a static function. You have "splineList.Destroy (spline);" which involves two variables (I don't know which of those is actually the VectorLine) and is not using a static function.

    --Eric
     
  8. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    *Bangs head on desk* It's working now Eric. After your advice I created a reference to the spline in my for loop then used VectorLine.Destroy.

    Thanks for the help. Truly appreciated.
     
  9. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    390
    Is there a way to see if any end caps exist?
    I'm getting an error the second time I call set end cap and was wondering if I can check for null or something so I don't get the error.
     
  10. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    390
    Oh I'm also having trouble having one line draw on top of another. I currently have it working but the end caps stay on top of both lines regardless of what I do.
     
  11. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    The drawing order issue is probably shader-related; you can try a different shader that uses the z buffer. I'm not sure what you mean about end caps existing; I'd have to see some code.

    --Eric
     
  12. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Hi Eric,

    Just want to confirm that it is not currently possible to change the thickness of a segment once a line has been drawn. Per the docs, only the entire line's thickness can be changed . . . just want to make sure I haven't missed something somewhere . . . would certainly come in handy though.

    Thx!
     
  13. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    264
    First thanks for this great plugin! :)

    Is there an easy way to mix it with Toolkit2D? I would like to draw simple 2d lines and want to put 2d sprites in front of the lines (above).

    Edit: solved it.

    If anyone wants to use Vectrosity together with Toolkit2D, here's what I did:

    Code (csharp):
    1.  
    2.     Vector3[] linePoints = new Vector3[2];
    3.     linePoints[0] = _tk2dcamera.ScreenToWorldPoint( new Vector3( 100.0f, 100.0f, 3.2f ) );
    4.     linePoints[1] = _tk2dcamera.ScreenToWorldPoint( new Vector3( 300.0f, 300.0f, 3.2f ) );
    5.     VectorLine.vectorLayer3D = 8;
    6.     VectorLine.SetCamera3D( _tk2dcamera );
    7.     VectorLine line = new VectorLine( "Line", linePoints, null, 2.0f );
    8.     line.Draw3DAuto();
    9.  
    You have to specify the correct layer (in my case layer 8 is my 2d layer) and set the tk2d camera. That's it. Using the z coordinate in the linepoints you can now change the "order" of the line in relation to the other toolkit 2d objects.
     
    Last edited: Jan 17, 2014
  14. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    No, you can use SetWidths to set width for individual segments.

    @Xaron: thanks for the info, good to know!

    --Eric
     
  15. ritual

    ritual

    Joined:
    Sep 26, 2013
    Posts:
    5
    hey im having a problem I cant solve...
    im trying to make a curve line that a gameobject follows.

    I can get the curve line made just fine. Once I try to make the gameobject follow it, it just appears at the beginning and at the ending. so it doesn't actually show the animation of it following the line. I have it debug each point in the line and they are showing up just fine but for some reason its not showing the position of the gameobject on its point just the first and last one.
    I followed for example curve to make the curve line and SplineFollow to make the gameobject follow it. It might be that I didn't transfer the code to C # correctly.
    thanks for any help


    here is my code

    Code (csharp):
    1.  
    2.  
    3. using UnityEngine;
    4. using System.Collections;
    5. using Vectrosity;
    6.  
    7. public class Player : MonoBehaviour
    8. {  
    9.     // Draw line variables
    10.     public Material lineMaterial;
    11.     private int segments = 250;
    12.    
    13.     public Transform origin;
    14.     public Transform destination;
    15.     public Transform plane;
    16.    
    17.     private float lineThickness = 0.2f;
    18.     private Vector2 midpoint;
    19.     private Vector2[] curvePoints;
    20.     private VectorLine line;
    21.     private Vector2[] linePoints;
    22.    
    23.     //Player Movement variables
    24.     public static bool run;
    25.     public float playerSpeed = 0.05f;
    26.  
    27.    
    28.     void Awake()
    29.     {
    30.         run = false;
    31.         VectorLine.SetCamera(camera);
    32.     }
    33.    
    34.     // Use this for initialization
    35.     void Start ()
    36.     {
    37.         SetUpLine();
    38.     }
    39.    
    40.     // Update is called once per frame
    41.     void Update ()
    42.     {
    43.         // only draw line if not running
    44.         if (!run)
    45.         {
    46.         curvePoints[2] = destination.position;
    47.        
    48.         line.MakeCurve(curvePoints[0], curvePoints[1], curvePoints[2], curvePoints[3], segments);
    49.         line.Draw();
    50.         }
    51.  
    52.         if (run)
    53.         {
    54.             MovePlayer();
    55.         }      
    56.     }
    57.  
    58.     void SetUpLine()
    59.     {
    60.         VectorLine.Destroy(ref line);
    61.        
    62.         FindMidPoint();
    63.        
    64.         //Set up initial curve points
    65.         curvePoints = new Vector2[4];
    66.         curvePoints[0] = origin.position;
    67.         curvePoints[1] = midpoint;
    68.         curvePoints[2] = destination.position;
    69.         curvePoints[3] = midpoint;
    70.        
    71.         // Make the line object for the curve
    72.         linePoints = new Vector2[segments+1];
    73.        
    74.         line = new VectorLine("Curve", linePoints, lineMaterial, lineThickness, LineType.Continuous);
    75.         line.depth = 1;
    76.        
    77.         //Create a curve in the VectorLine object
    78.         line.MakeCurve (curvePoints, segments);
    79.         line.Draw();
    80.     }
    81.  
    82.     void FindMidPoint()
    83.     {
    84.         //Find midpoint of line to create the anchor points
    85.         midpoint.x = ((origin.position.x + destination.position.x) / 2);
    86.         midpoint.y = ((origin.position.y + destination.position.y) / 2);
    87.     }
    88.  
    89.     /// <summary>
    90.     /// Moves the player along the line
    91.     /// </summary>
    92.     void MovePlayer()
    93.     {
    94.         Debug.Log("running");
    95.  
    96.         //for (float dist = 0.0f; dist < line.GetLength (); dist += Time.deltaTime*playerSpeed)
    97.         for (float dist = 0.0f; dist < 1.0f; dist += Time.deltaTime*playerSpeed)
    98.         {
    99.  
    100.             Vector2 pointInLine = line.GetPoint01(dist);
    101.             //Debug.Log("point in line" + pointInLine);
    102.             plane.position =  new Vector2(pointInLine.x, pointInLine.y);
    103.  
    104.         }
    105.         run = false;
    106.         SetUpLine();
    107.     }
    108. }
    109.  
    110.  
     
  16. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    819
    Hi!

    I am trying to properly delete the lines i am using when they are not used any more. I hold them in the list List<VectorLine> lines = new List<VectorLine>();
    if i do this

    Code (csharp):
    1. foreach(VectorLine line in lines)
    2. {
    3.  VectorLine.Destroy(ref line);
    4. }
    I get an error... how to erase lines that are in the collection or something like that?
     
  17. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    You're doing the doing the entire loop in one frame. In general I'd recommend using coroutines for this sort of thing (such as used in the SplineFollow scripts), since trying to use Update can make the logic get overly convoluted.

    I doubt a foreach loop will work for destroying objects while iterating through them. I'd suggest using a standard for loop instead.

    --Eric
     
  18. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    I saw that, but the docs say it can only be done at the time the line is drawn, not after,myLine.lineWidth can only be applied to the entire line. And when I tried it, got an error ("No appropriate version of 'Vectrosity.VectorLine.SetWidths' for the argument list '(float)' was found.")

    Was hoping I could control widths in the same manner as color . . . but no big deal.

    Thanks, as always, for the quick response.
     
  19. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    No they don't. ;) Are you using an old version?

    --Eric
     
  20. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Well, I'm not going to argue semantics. ;-)

    But it does say:

    So that's what I want to do -- change the width of discrete segments AFTER the line has been set. Like: myLine.setWidths(4.0, 278 ). Looks like it's not possible, but wanted to confirm.

    Thx.
     
    Last edited: Jan 17, 2014
  21. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    Sure it's possible; see "VectorLine widths" on that page in the docs where it talks about SetWidths. You're looking at lineWidth, which sets all the segments to the same width.

    --Eric
     
  22. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    I did look at that. And that requires an array of values that map 1:1 to the segments. If I have a line with thousands of segments, and i want to change a handful of them, this is not very practical, as there does not appear to be any direct access to the index. Also, the verbiage in the doc does imply that this technique is what would be used at the time the line is drawn, not after, which is apparently why myLine.lineWidth exists.

    Am I missing something? Could you post a short example of the syntax for a case where, for example, I could change segment 2747 in a line with 3600 segments?

    Much obliged!
     
  23. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    That's true...it's been brought up before actually, so the next version has an option to use SetWidths like SetColor.

    No, lineWidth is for changing all the line segments to a particular width. I think what you're referring to is the result of the lineWidth entry having been written first (before SetWidths existed), so it could be kind of interpreted as a response to the SetWidths entry, but that wasn't the intent. So I've reworded it somewhat.

    --Eric
     
  24. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Fair enough . . . thanks!
     
  25. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    819
    I doubt a foreach loop will work for destroying objects while iterating through them. I'd suggest using a standard for loop instead.

    --Eric[/QUOTE]

    I tried this too

    Code (csharp):
    1.         for (int i = 0; i < VisualGuideLines.Count; i++)
    2.         {
    3.             VectorLine.Destroy(ref VisualGuideLines[i]);
    4.         }
    5.  
    6.         VisualGuideLines.Clear();
    it complains that indexer cannot have ref and if i erase ref it complains that ref is missing.
    any ideas how to tackle this? it seems like a common thing holding lines in a list and then trying to destroy them when not needed any more
     
  26. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    Hi pretender,

    I bumped into this a few days ago. I solved by creating a reference to the VectorLine (in my case splines). So for your code:

    Code (csharp):
    1.  
    2. for (int i = 0; i < VisualGuideLines.Count; i++)
    3. {
    4.     var visualGuideLine = VisualGuideLines[i];
    5.     VectorLine.Destroy(visualGuideLine);
    6. }
    7.  
    8. VisualGuideLines.Clear();
    9.  
    10.  
    Hope it helps!
     
    Last edited: Jan 18, 2014
  27. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    819
    It works fine! thanks!
     
  28. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    Great! Happy to help pretender :)

    Eric: I have sent you a PM. Not sure if you have seen it yet. Thanks.
     
  29. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    I replied yesterday at 4:06PM, according to the sent PM list.

    --Eric
     
  30. Hexagon-Neuron

    Hexagon-Neuron

    Joined:
    Oct 1, 2010
    Posts:
    305
    Sorry Eric, yes you did, for some reason I never noticed it. Will email you soon.
    Thanks!
     
  31. IWorshipCookies

    IWorshipCookies

    Joined:
    Sep 19, 2013
    Posts:
    1
    Hey Guys! I am relatively new to Unity and Vectrosity. I have some programming experience but not in computer graphics, and I am wondering if it is possible to make the lines in Vectrosity have a Crayon or Sketch like feel (I guess a bit like Crayon Physics or something like that) and if so how would I go on about doing that?
     
  32. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    You could use an appropriate texture for the line, along with SetTextureScale to avoid stretching, and use end caps so the beginning and end of the line look right.

    --Eric
     
  33. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    How do i make my object that follow the line is above the line not below it. It seems that my object is below the line.
     
  34. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    I assume that would depend on the pivot point of the object, so you can change that.

    --Eric
     
  35. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    390
    I'm having trouble getting the vectorlines of mine to show up on top of 2d sprites. Whats the best way to change the draw order of the vector line or depth or whatever will make it draw on top of my 2d UI sprites. Thanks!
     
  36. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    I haven't tried this yet, but probably you would set vectorObject.renderer.sortingLayerID?

    --Eric
     
  37. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    390
    Actually you were close, sortingLayerID didn't do anything for me but lineToWeld.vectorObject.renderer.sortingOrder = -1; worked and it changed the end caps as well which were what the main problem was.
     
  38. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    How do I destroy the line I have drawn? for example my object have finished followed the path i want to destroy the line path how would I do that.

    Second question, I would like to make my line disappear as my object follow the path, example when the object start moving the line start to disappear at the object point of movement.

    Thank you.
     
    Last edited: Jan 30, 2014
  39. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    1. VectorLine.Destroy().
    2. VectorLine.drawStart, using the appropriate array index.

    --Eric
     
  40. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Hi Eric, quick question.

    Is it possible to get the color of a line segment? I know you can *set* it, but is there a straightforward way to *get* it once its been set?

    Use case would be to change the state of an arbitrary segment based on an event -- so 1) get the color (which is otherwise unknown and could be anything), 2)change the segment color to an "on" state, and then 3) change it back to whatever the original color was.

    thanks!
     
  41. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    Not currently, but that's a good idea.

    --Eric
     
  42. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    why when i used
    Code (csharp):
    1. VectorLine.Destroy (line);
    i recieved this error
    Code (csharp):
    1. The best overloaded method match for `Vectrosity.VectorLine.Destroy(ref Vectrosity.VectorLine)' has some invalid arguments
    and this
    Code (csharp):
    1. Argument `#1' is missing `ref' modifier
    and how do you used the drawStart as a float?? from your document it says drawstart and drawend are int.
     
    Last edited: Jan 30, 2014
  43. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    Yes, as it says, you need to use "ref" (if you're using C#).

    --Eric
     
  44. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    Edit, Okay how do you used VectorLine.DrawStart with float. cannot make it happen.

    thank you.
     
    Last edited: Jan 30, 2014
  45. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    .drawStart is an int, since it's referring to an index in the points array.

    --Eric
     
  46. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    Okay understand that, but would like to how the "startIndex" and "endIndex" in "AnimatePartialLine" demo used float value.

    Thank you.
     
  47. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Thanks, Eric. Found a workaround, luckily. There's always a way! :)
     
  48. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    It's just casting from float to int.

    --Eric
     
  49. bitbutter

    bitbutter

    Joined:
    Jul 19, 2012
    Posts:
    60
    Apologies if this isn't the right place to post this. I'm having a little difficulty using the Joins.Fill option.

    I have a routine that's intended to leave a simple line behind the player, showing how he's moved. If I use Joins.None it works as expected (and has tiny 'cracks' between the curving line segments, as expected).

    $Screen Shot 2014-02-02 at 3.40.19 PM.png

    I'd like to avoid these 'cracks', but If I use Joins.Fill i get the following result. The 'sawtooth' effect i'm getting isn't what I want:

    $Screen Shot 2014-02-02 at 11.03.14 AM.png

    I'm using Vectrosity 2.3, here's the line drawing script that's attached to the player object. Can anyone see what's going wrong here?

    Code (csharp):
    1. import Vectrosity;
    2.  
    3. var lineMaterial : Material;
    4. var maxPoints:int = 1000;
    5. var updateInterval:float=0.03; //seconds between each new line segment being drawn
    6. var createGap:boolean=false;
    7. var trailPoints : Vector3[];
    8. var keepGoing:boolean;
    9. var color:Color;
    10. var widthInPixels:float;
    11.  
    12. private var trailLine : VectorLine;
    13. private var trailIndex = 0;
    14. private var trailDepth : float;
    15.  
    16. function Start () {
    17.     trailDepth=2;
    18.     widthInPixels=2;
    19.     DrawingLoop ();
    20. }
    21.  
    22.  
    23. function DrawingLoop () {
    24.     Debug.Log(trailPoints);
    25.     keepGoing=true;
    26.     StartNewLine(gameObject.transform.position);
    27.     while (keepGoing) {
    28.         StoreCurrentPosInCurrentIndex();
    29.         yield WaitForSeconds(.03);
    30.         SetMinMaxDrawingIndex();
    31.         DrawLatestSegments();
    32.         trailIndex++;
    33.     }
    34. }
    35.  
    36. //---------------------------------------------
    37.  
    38. function StartNewLine(startPoint:Vector3){
    39.     InitialiseTrailPoints(startPoint);
    40.     CreateVectorLine();
    41. }
    42. function StartNewLine(){
    43.     InitialiseTrailPoints();
    44.     CreateVectorLine();
    45. }
    46.  
    47. function StoreCurrentPosInCurrentIndex(){
    48.     trailPoints[trailIndex] = Vector3(gameObject.transform.position.x,gameObject.transform.position.y,gameObject.transform.position.z);
    49. }
    50.  
    51. function SetMinMaxDrawingIndex(){
    52.     trailLine.maxDrawIndex = trailIndex;
    53.     trailLine.minDrawIndex = trailIndex-1;
    54. }
    55.  
    56. function DrawLatestSegments(){
    57.     if(trailIndex>0){
    58.         trailLine.Draw3D();
    59.     }
    60. }
    61.  
    62. function InitialiseTrailPoints(){
    63.     trailIndex = 0;
    64.     trailPoints = new Vector3[maxPoints];
    65. }
    66.  
    67. function InitialiseTrailPoints(startPoint:Vector3){
    68.     trailIndex = 1;
    69.     trailPoints = new Vector3[maxPoints];
    70.     trailPoints[0]=startPoint;
    71. }
    72.  
    73. function CreateVectorLine(){
    74.     trailLine = new VectorLine("TrailVectorLine", trailPoints, color, lineMaterial, widthInPixels, LineType.Continuous,Joins.Fill);
    75.     trailLine.SetTextureScale(1.0);
    76.     createGap=false;
    77. }
    78.  
     
  50. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,225
    Yes, there's a bug with .maxDrawIndex when using Joins.Fill (which will be fixed in the next version). In the meantime you can use .drawEnd instead.

    --Eric
     
Thread Status:
Not open for further replies.
unityunity