- Home /
Place 2D image in 3D space - not GUI, not 3D object
Hello. I've tried looking on the forums here to find this specific problem, but no luck!
What I am looking to do is place 2D images of various stars in a 3D space. When you move through the 3D space, the stars' images will get smaller and larger, and move relative to the camera, but will always look the same (no rotation or 3D aspect to the object).
So I'm not looking at a GUI image, and I'm not looking to create a 3D object, but to place a 2D image in 3D space. Any clues?
there is no way to add 2d images in 3d space. u have to make a plane and add the image as a texture to it.
see this question http://answers.unity3d.com/questions/445490/is-using-onpostrender-to-draw-textures-pro-only.html i stumbled upon it by accident lol
Graphics.DrawTexture(new Rect(0,0,128,128),$$anonymous$$yTexture);
when used in OnPostRender will make a new texture appear in 3d space
Answer by IdeologicSlocombe · Dec 04, 2013 at 02:00 PM
Yes, thank you Manco - I found the solution was to put the image on a plane and then add a script to the plane which always ensured that it was facing the camera:
void Update () {
transform.up = Camera.main.transform.position - transform.position;
transform.forward = -Camera.main.transform.up;
}
could't be easier, just get 2DToolkit and it does it instantly
Your answer
Follow this Question
Related Questions
2d or 3d for better perform on mobile devices? 1 Answer
2D object look at 3D object 0 Answers
2d sprite bacground motion? 2 Answers
UDP app signature? 1 Answer
2D and 3D lights in a scene. URP,2D and 3D lights in scene URP 1 Answer