I am creating star sky for my game with plane prefabs that have a texture attached to it. For the effect of the stars to work I want them to face the player when they are created. The player doesn’t move and only moves his head (Its a VR game).
What is the best way to do this?
I added a billboard script to my object but it seems to be facing the wrong way.
This is in the update:
transform.LookAt(transform.position + referenceCamera.transform.rotation * Vector3.forward, referenceCamera.transform.rotation * Vector3.up);
The referenceCamera is the main camera:
if (!referenceCamera)
referenceCamera = Camera.main;