Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Problems using cinemachine and the new unity input system

Discussion in 'Cinemachine' started by cpamazing, May 27, 2020.

  1. cpamazing

    cpamazing

    Joined:
    May 20, 2020
    Posts:
    2
    Hi!

    I've been working on my first 3rd person game, however, I'm facing lots of issues with using cinemachine with the new input system.

    Following the brackey's tutorials, I've gotten my player character to move and turn according to the camera, but when I apply the cinemachine collider extension, the camera constantly zooms into and clips into the player model. This seems to be an issue with the collider extension, as there are no issues without it, yet I can't seem to find anything wrong with my code or with the editor.

    Any assistance would be appreciated.
    cod1.png code.png
     
    Neogene likes this.
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,841
    It has nothing to do with the new input system.

    The CM collider projects a ray from the vcam to the LookAt target. If that LookAt target point is inside your character, it will think that the character is an obstacle. That's why you set the IgnoreTag to Player - so that the CM collider won't be confused by the player's own colliders. I suspect that not all the colliders in your player have the Player tag. You can try adding the tag everywhere appropriately.

    Another way to deal with this issue is to increase the MinimumDistanceFromTarget value so that it's large enough to clear any colliders associated with the player.
     
    Last edited: May 27, 2020
  3. cpamazing

    cpamazing

    Joined:
    May 20, 2020
    Posts:
    2
    Thank you very much, I'll try this as soon as I can.

    If you don't mind asking, will there be an easier way for cinemachine to use the new input system? Similar to how it can use the old input system by default.

    Thank you once again.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    3,841
  5. Neogene

    Neogene

    Joined:
    Dec 29, 2010
    Posts:
    85
    Hoping to see the input system component for CM to be released with next preview 6 soon (as reported in a comment in the blog page it's not in preview 5).
     
    gaborkb likes this.
unityunity