Player doesn't turn

Hi there,

I’m using Unity tutorials to make a game and in this part - Survival Shooter Tutorial - 2 of 10 : Player Character - Unity Official Tutorials (new) - YouTube - I got issue because my player doesn’t turn there where my mouse is. Here is my code for turning:

    void Turning()
        Ray camRay = Camera.main.ScreenPointToRay(Input.mousePosition);

        RaycastHit floorHit;

        if(Physics.Raycast (camRay, out floorHit, camRayLenght, floorMask))
            Vector3 playerToMouse = floorHit.point - transform.position;
            playerToMouse.y = 0f;
            Quaternion newRotation = Quaternion.LookRotation(playerToMouse);


I was trying to find issue on my own and everything I found as other people was fixing this is that they either didn’t have correct scale for quad which is floor - 100 x 100 x 1 - or they didn’t have Z scale at least 1, usually they had 0 or layer of quad which is floor was set up to defalut instead floor. I’ve had all of these setting already but my player still does not turn where my mouse it. Any ideas?

That part of your script looks fine but watch the last 5 minutes of that tutorial. They mention that Awake and FixedUpdate and some other functions get called automatically but other functions, that you create, don’t unless they’re called. I think you’re not calling


In FixedUpdate or there’s a typo somewhere.