Closed Nahush22 closed 4 years ago
This is my script that I attached to the gameobjects for each planet that were present in the Sun's position. circlescript.txt
I dont think I understand what youre saying here:
the lines faced towards the direction of the camera
Is the issue that the lines get clipped due to the far clip plane of the camera?
Ohh I am sorry.Since I am new to Unity I dont know how to explain it properly. I am actually building an AR app using Unity which renders the solar system on top of an image target. If you see the images I included then you can see that in the editor mode I placed the circles that I created using the script on the orbits of the planets.But after I built it as an apk file & then installed & ran it on my Android phone, the circles arent in the planet orbits & seem to be displaced from them.You can see it in the second image.I think the 2nd image might be confusing since I made the planets to also orbit around the sun in runtime.The circles arent static & are moving along with the camera.Again extremely sorry if I didnt explain it properly.If you dont understand it then maybe I'll also take a video of what is happening in runtime & link it here.
Ok, I after a bit of research I tried changing the orientation of the camera(i set x value to 90 in rotation) in editor.So now the circles are rendered over the planet orbits in my phone camera as seen in the image above.But the problem now is that the lines/circles arent staying still & are constantly moving along with the orientation of my phone camera.Any fix or workaround for this?
So the lines are aligned to the phone camera?
No,if you see the 3rd image then you can see that I fixed the lines being seemingly perpendicular to the camera view.But now the problem is that the lines arent stationary & they move whenever I move the phone camera.
Yeah i dont think im getting at what youre trying to say, do you have a video to show? And is this even related to the code in the gizmos package or something to do with the AR setup?
Closing due to inactivity and unclear details
I have attached 2 images below.In editor(image 1) the the lines drawn are perfectly placed on the planet orbits but in runtime(image 2) the lines faced towards the direction of the camera.How to fix it or make the lines stay static?Thanks in advance.