Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     virtualCamera = GetComponent <Cinemachine.CinemachineVirtualCamera>();
     transposer    = virtualCamera.GetCinemachineComponent <Cinemachine.CinemachineTransposer>();
     viewDistance  = transposer.m_FollowOffset.magnitude;
     viewHeight    = transposer.m_FollowOffset.y;
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        ballCollider = GetComponent <SphereCollider>();
        rbody        = GetComponent <Rigidbody>();

        snowballMaterial = meshRenderer.sharedMaterials[0];
        cameraTransposer = virtualCamera.GetCinemachineComponent <Cinemachine.CinemachineTransposer>();
    }
Esempio n. 3
0
    IEnumerator SetupOthersOnLoad()
    {
        foreach (NavMeshLinkPoints link in Object.FindObjectsOfType <NavMeshLinkPoints>())
        {
            link.AlighPoints();
        }

        foreach (Checkpoint3 c in Object.FindObjectsOfType <Checkpoint3>())
        {
            if (c != this)
            {
                c.human = human;
                c.dog   = dog;
            }
        }


        Cinemachine.CinemachineTransposer vcamC = Object.FindObjectOfType <Cinemachine.CinemachineTransposer>();
        float x = vcamC.m_XDamping;
        float y = vcamC.m_YDamping;

        vcamC.m_XDamping = 0;
        vcamC.m_YDamping = 0;

        Object.FindObjectOfType <ControlManager>().SetupPlayers();
        Object.FindObjectOfType <CameraFollowPivot>().ChangeTarget(human); //error
        if (dog)
        {
            if (dog.GetComponent <NavMeshMovement>())
            {
                dog.GetComponent <NavMeshMovement>().target = human;
            }
        }
        vcamC.transform.SetPositionAndRotation(HumanResetPos.position, HumanResetPos.rotation);
        yield return(new WaitForFixedUpdate());

        vcamC.m_XDamping = x;
        vcamC.m_YDamping = y;
        yield return(null);
    }