Hot answers tagged

2

When you have 2d sprites in a 3d environment, they work like two-dimensional planes. Think of them as cardboard-cutouts which are moving through the world. When you want to rotate these cardboard cutouts to always face the camera, then the search term you are looking for is "Billboarding". It can be implemented by attaching this MonoBehaviour to it: using ...


1

Here's what I think is happening: the matrices in your static singleton sprite class (say that three times fast) -- specifically the model-view matrix -- is being modified on drawing every sprite without being reset to how it was before the modification. As such, any transformation you perform for one object is also applied to any subsequently drawn object ...


1

My apologies, I should have picked up on this quicker. Instead I made you get a screenshot that wasn't needed. Your not waiting for your WWW to complete before creating the sprite. So basically the www.texture is empty at the time you use it. Check www.isDone before working with the texture to see what I mean. If you do not want to do this in a Coroutine ...


1

I would recommend you to place the 2d sprite not in the game world but instead place it on a UI canvas with "Screen Space - Overlay" mode. You can convert the game-world position of a GameObject to screen-coordinates using Camera.WorldToScreenPoint. Then you need to convert the screen coordinates to canvas coordinates and place your sprite there. Code ...



Only top voted, non community-wiki answers of a minimum length are eligible