Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Help with Input system and Cinemachine

Discussion in 'Input System' started by chalasanihemanth25, Jun 28, 2022.

  1. chalasanihemanth25

    chalasanihemanth25

    Joined:
    Apr 15, 2021
    Posts:
    3
    Hi,
    I am developing a third person parkour game with new input system and cinemachine. You can move with the right joystick and look around using right joystick(Cinemachine Input provider). For doing tricks I am using button with one modifier, you press R2 and move the right joystick in different directions for different tricks. But when I move the right joystick for a trick cinemachine rotates the camera.

    Is a way to stop cinemachine to rotate the camera when other buttons are pressed.

    Thank you in advance.

    Hemanth
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,138
    I think the way to do it is to set up your inputs that you connect to the CM camera so that they don't send values when the buttons are pressed. You can ask on the input forum for help doing that.
     
  3. andrew_oc

    andrew_oc

    Unity Technologies

    Joined:
    Apr 16, 2021
    Posts:
    77
    This has been a long standing known issue until Input System 1.4, which should be released any moment now. We introduced something similar to the idea of input event consumption, so the action that's bound to R2 + right joystick will have a higher priority than the action bound to just right joystick, will get first shot at the input event, and will mark it as handled so the other action never gets a chance to run. Both actions will need to be defined in the same input action asset for this to work though.