コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        Cursor.lockState = CursorLockMode.Locked;

        orbitCamera.SetFollowTransform(cameraFollowPoint);
        orbitCamera.IgnoredColliders = character.GetComponentsInChildren <Collider>().ToList();
    }
コード例 #2
0
    protected void Start()
    {
        Cursor.lockState = CursorLockMode.Locked;

        // Tell camera to follow transform
        CharacterCamera.SetFollowTransform(Character.transform);

        // Ignore the character's collider(s) for camera obstruction checks
        CharacterCamera.IgnoredColliders.Clear();
        CharacterCamera.IgnoredColliders.AddRange(Character.GetComponentsInChildren <Collider>());
    }