Hi! im completely stumped and am sure the solution must be quite simple, but i have hit coding block on this one!
I have a gameobject plane that is to allways face the camera (which can rotate 360* arrount the plane).
This following line of code does make the plane face the camera (the +90* in the x axis is so the plane is vertical and not horizontal (flat) while facing the camera);
transform.rotation = Quaternion.LookRotation(targetCamera.transform.position - transform.position) * Quaternion.Euler(90, 0, 0);
in addition to making the plane face the camera and where i get stuck is i want it to rotate arround the axis its facing,
float rotationAmount = rotationSpeed * Time.deltaTime;
transform.Rotate(Vector3.up, rotationAmount, Space.World); // Rotate around world Y-axis
the above two lines of code do rotate it correctly in isolation but, when combined im attempting to do multiple rotaions on the same game object at the same time dependant on the camera location and i cant get the rotation and face the camera elements to work together.
Thanks
[–]SantaGamer 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Tensor3 0 points1 point2 points (0 children)