Exemplo n.º 1
0
    public void Update()
    {
        Vector3 bestMovement = BestMovement();

        //set location and rotation
        LocRot(bestMovement);

        //apply gravity
        ApplyGravity();

        //set animation
        animationController.Anim(bestMovement, speed);

        //camera Movement
        xRotation = input.MouseDeltaPerFrame(true, Input.GetMouseButton(0)).x;
        cam.transform.localPosition = camDefaultPosition * input.cameraZoom();
        cam.transform.LookAt(transform);
    }