- Home /
Vectrosity - lines disappear on certain camera angles
Hello everybody,
using Vectrosity, on multiple camera transforms the drawn lines disappear.
There is supposed to be a red line drawn on the x-axis. Moving a little to the left renders the line again.
This is how I usually use Vectrosity to instantiate my lines:
VectorLine xAxisA = new VectorLine("x axis positive", xAxisPoints, null, 1);
xAxisA.SetColor(xAxisColor);
xAxisA.drawTransform = go.transform;
xAxisA.Draw3DAuto();
This problem occurs on each line which I draw like this.
Isn't the call Draw3DAuto() supposed to take care of this?
Thanks in advance!
The draw calls are invoked inside the Start() function of a $$anonymous$$onoBehaviour.
Adding a delay of 3 seconds using Invoke(String functionName, float time) gets rid of this issue. But making use of such a delay doesn't feel like the way to go.
Is anybody able to assist?
Are you using invoke with a delay of 0 seconds, doing so is quite buggy, try 0.001f?
Using a much smaller time for Invoke causes the x and y axis not to be drawn. So only the blue z axis and the yellow lines get drawn.
These are the two methods which I would like to call inside Start().
So how does one go about insuring that the camera faces the lines?
Answer by MarcoMeter · Sep 15, 2015 at 04:53 PM
With further investigation I figured out that if the Camera doesn't face the VectorLines on Start, the lines won't get properly.
So if the camera initially faces the VectorLines, everything is getting rendered properly.
I exported a simple package which reproduces this behavior: https://drive.google.com/open?id=0B3AXCAD_TuTFYmxFMDZ0TGx6LUU