Rotation on camera not working in webGL
The camera keeps resetting in the webGL. This work perfectly on the Unity window but glitches when running on the browser. I am taking the input for the count and my from the browser itself. I want the camera to rotate whenever the count>4 and my==1. Camera shifts and the resets. I have tried to run the webGL built on EDGE and crome. Please Help!
if(count>4 && my == 1)
{
Debug.Log("THis is called");
GameObject box2 = Instantiate(box, new Vector3(2.23f, 19.45f, -0.1f), newRotation);
factor += 3;
maincamera.transform.rotation= Quaternion.Euler(0-factor, 0, 0);
my = 0;
}
Comment
Your answer
Follow this Question
Related Questions
Weird Rendering Unity5 1 Answer
How to assign Instantiated object through script? 1 Answer
transform.localscale to specific size 1 Answer
how to build project in unity for IOS platform? 0 Answers
Switching player controllers 0 Answers