Unity Community |
Yeah, bummer. I can watch the points while the game is running and there's no movement. Hmm.
I guess my issue is that in my final setup, the two middle points of the line will almost always be in motion, so they pretty well need to be updated continuously.
There kind of has to be, if the texture is changing. Probably the perspective changes involved in moving the camera changes the screen space length of the lines. (Since the texture scale calculations are based on screen space.)
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
Yes, okay I see what you mean. If you're calculating it based on screen space (and I guess I read that at some point) then it makes sense. I guess it's not exactly made for a situation with this much ambient camera motion![]()
Hello, I like drawing free surfaces using the mouse and when I finish I clik on the surface entry will display help me and give me the correct code
Sorry, I couldn't understand that at all.
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
I have to draw a free surface in 3D of course unity with the mouse and when I finish I CLIKE grafted on the surface appears
Eric
I have an odd problem that I need some help with.
1) In the first attachment (3dLinesGood.jpg) you will see some lines connecting some spheres. These lines were created with vectrocity in 3d and they look fine as you can see.
2) In the second attachment (3dLinesBad.jpg) you will see a graph created with 2d vectrocity lines with the 3d image "behind" it. As you can see, the 3d lines go haywire.
Do you have any idea what is going on here? Once the graph (2d lines) is displayed, the 3d lines dont work. If I never display the graph the 3d lines look fine. This is quite repeatable.
Thanks
Can you get someone who knows some English to help you write your question, because I'm afraid I just don't understand what you're trying to say.
That is weird. I did a quick test here where I draw a 3D line then wait a bit and draw a 2D line, and there aren't any issues like that. Can you send me the project?
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
Eric,
Regarding the 3d lines problem, can you try your quick test the other way around? Draw the 2d lines, then 3d. If this does not repeat the problem, I'll see about sending you a contained project.
Thanks!
Still works fine the other way around.
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
Eric
I sent a condensed project to your Starscenes email account. Thanks
Tom
Hello there!
I'm trying to do one simple thing!
Exactly like Flight Control, but with some distance travel limmiter, you can only draw like a 1000 pixes.
But the problem start with this, I'm using the DrawLinesTouch example, but porting to C#, here is what i get:
Code:
using UnityEngine; using System.Collections; using System.Collections.Generic; { public Airplane airMain; public Material matLine; private float fLineWidth = 3f; private float fMaxDist = 1000; private Vector3 v2PrevMouse; private VectorLine linePath; private int iLineIndex; private float fDistCount = 0; private int sqrMinPixelMove = 5*5; private bool bPress; // Use this for initialization { linePath = new VectorLine("DrawnLine", arrLinePoints, matLine, fLineWidth, LineType.Discrete); } private void StartDrawMouse() { Vector.ZeroPointsInLine(linePath); linePath.minDrawIndex = 0; linePath.maxDrawIndex = 1; iLineIndex = 0; fDistCount = 0; bPress = true; } private void StopDrawMouse() { bPress = false; } private void Record() { if(fDistCount < fMaxDist) { { linePath.minDrawIndex = iLineIndex-1; linePath.maxDrawIndex = iLineIndex; iLineIndex++; v2PrevMouse = Input.mousePosition; } } else { StopDrawMouse(); } } // Update is called once per frame { if(bPress) Record(); { if(airMain.myStatus == Airplane.Status.AVALIABLE) { StartDrawMouse(); } } { StopDrawMouse(); } } }
But every new click i get some strange point from 0,0! Look at this video:
Someone can help me?
Since you're using a discrete line, you should wait until there are at least two points before drawing anything. Otherwise it's connecting the first point with Vector2.zero.
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
Hum..
Looks so simple now you tell me! hahaha just to the record:
Just this save the work:
Code:
if(iLineIndex > 1)
Last edited by badawe; 04-03-2012 at 01:04 PM.
I've got an issue where I'm drawing two separate lines, but using instances of the same material, and are having Vector.SetTextureScale(line, 1f); called. This call is causing the first line to lose it's texture scale information and become stretched again.
Would you have any immediate ideas on why this might be happening?
Are you changing the material scaling yourself somewhere? SetTextureScale only changes the UVs of the line that's passed into that function, it doesn't actually touch the material or texture at all.
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
Hey hi Eric,
Can i attach this 3D line as term of vector to my car body . The dimension and direction of this line should change as my car is moving in particular direction. Is that possible ?.
I have physics formulas and i want to attach lines to the center of gravity of the car. Those lines are velocity and acceleration components.
Please let me know.
Thank You
Pinkesh
That's related to this topic, I see. Vectrosity doesn't currently have support for arrows at the ends of lines like that, so I don't think it would quite work for your particular case.
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser
Hello again, Eric, I've got question about adding colliders to vector lines. I'm attempting to build an erase tool by finding all vector objects in range of my cursor using a sphere collider on the cursor and then iterating the line arrays of all hit vector lines but I'm not sure how to add colliders to the lines. Can I do this at runtime? Should I add box colliders or mesh colliders? To the vector line or vector object?
I'm not sure adding colliders would be the best way. I'd suggesting iterating through all the points and checking the distance. (Using the (a-b).sqrMagnitude technique would be a little faster than Distance, which is the same as (a-b).magnitude and uses a square root.) Unless you have a really huge number of points, the performance should be OK. If not, there are other techniques for optimization that would be better than adding tons of colliders.
--Eric
FlyingText3D: real 3D text with TTF fonts | Vectrosity: fast & easy line drawing | Fractscape: fast & fun terrains
Nifty utilities! Stitch terrains together - runtime model importing - file browser