Hey everyone!
I have a question regarding calculating a vector based on the rotation of my main camera. I have been looking around on unityAnswers and found what I thought was the correct way of doing this, however an error occurs when I try to execute this script:
var rot = Quaternion.Euler(Camera.main.transform.eulerAngles);
var yangle = Vector3.forward * rot;
I want to use the resulting vector in raycasting. The script I wrote for that purpose does works without any problems when I use the standard forward vector.
Thanks a lot!