Search Unity

Cinemachine Collider With Special Lookat

Discussion in 'Cinemachine' started by usernameHed, Apr 14, 2019.

  1. usernameHed

    usernameHed

    Joined:
    Apr 5, 2016
    Posts:
    93
    Hello, Can I use a cinemachine Collider with my own LookAt ? not the one used by the cinemachineCamera ?

    My Lookat move in front of the player, so the camera is looking at this point.
    But I want the camera Collider to operate when my player is behind wall (and my player is a different target)

    Also a suggestion: Can you handle multiple ignore tag in the list of ignore Tag ?

    Thanks !
     
    Last edited: Apr 14, 2019
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    You could try using the Minimum Distance From Target setting. Collider will ignore any obstacles that are closer to the target than this. Maybe you can dynamically adjust it to exclude the wall?

    upload_2019-4-15_12-51-40.png

    Or maybe you can add the wall to the transparent layer?

    If you find that you need to customize the collider beyond what it can currently do, you can copy the script, drop a renamed version of it into your project, and customize it as you wish (perhaps to use a special LookAt target). Due to its inheritance, your new version will appear in the vcam's Extensions dropdown.