Example #1
0
    void FixedUpdate()
    {
        //** Movement **//
        Vector3 input = getInput();

        if (Input.GetKey(KeyCode.LeftShift))
        {
            spider.run(input);
        }
        else
        {
            spider.walk(input);
        }

        Quaternion tempCamTargetRotation = smoothCam.getCamTargetRotation();
        Vector3    tempCamTargetPosition = smoothCam.getCamTargetPosition();

        spider.turn(input);
        smoothCam.setTargetRotation(tempCamTargetRotation);
        smoothCam.setTargetPosition(tempCamTargetPosition);
    }