playMaker

Author Topic: Disable Cinemachine input on UI touch  (Read 4256 times)

mundus

  • Playmaker Newbie
  • *
  • Posts: 5
Disable Cinemachine input on UI touch
« on: November 04, 2019, 01:40:38 PM »
Hi,

Is there a simple way of disabling/enabling input into Cinemachine when I interact with a UI item such as a slider? I have my camera set as orbit looking at the player, anytime I use a slider, the camera also rotates, which is what I do not want to happen.

I've tried using the Enable Core Input action together with the Virtual Camera Get Current Active but it doesn't seem to disable the input.

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Disable Cinemachine input on UI touch
« Reply #1 on: November 05, 2019, 01:59:06 AM »
Hi,

 yes, use the CinemachineCoreGetInputTouchAxis component

this component not only lets you use touches as inputs for cinemachine but also will let you disable it

Set the InputEnable to true or false ( using setProperty action, I'll make an action for it at some point) to enable or disable cinemachine reactions to inputs.

Bye,

 Jean


mundus

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Disable Cinemachine input on UI touch
« Reply #2 on: November 06, 2019, 02:01:56 AM »
Hi Jean,

Thanks for the info, it works perfectly when I run it within the editor but not on my Android device? The transitions UI Drag and UI Pointer up trigger correctly on PC but I think not on Android. I've tried also including Mouse Drag, Down, Up but still no luck.

Am I using the wrong transitions for Android?

Thanks!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Disable Cinemachine input on UI touch
« Reply #3 on: November 06, 2019, 02:13:28 AM »
Hi,

 no, you need to use the Linker wizard.

but, wait, the action is already there... it's called EnableCoreInput

Do you have it?

Bye,

 Jean

mundus

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Disable Cinemachine input on UI touch
« Reply #4 on: November 06, 2019, 02:53:44 AM »
Hi,

Ok, I will try the linker wizard later today. Is it still ok to use in 2019.1 as the Ecosystem has it tagged as Unity 4?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Disable Cinemachine input on UI touch
« Reply #5 on: November 06, 2019, 03:37:04 AM »
Hi,

 yes, it's compatible.

Bye,

 Jean

mundus

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Disable Cinemachine input on UI touch
« Reply #6 on: May 05, 2020, 04:22:06 AM »
Hi Jean,

Just picking up this issue. I'm using the Action included with Playmaker Cinemachine - Enable Core Input but it still doesn't work on Android. Do I still need to use Linker Wizard?

Kind Regards


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Disable Cinemachine input on UI touch
« Reply #7 on: May 06, 2020, 03:12:45 AM »
Hi.

- do you have a CinemachineCoreGetInputTouchAxis component on your cinemachine main camera?

- you don't need the linker wizard for any of the cinemachine actions.

Bye,

 Jean

mundus

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Disable Cinemachine input on UI touch
« Reply #8 on: May 06, 2020, 05:31:11 AM »
Hi Jean,

I've added the CinemachineCoreGetInputTouchAxis script components both to my Main Camera and Virtual Cam. I can see the script's Input Enabled field being set to false when I click and drag the slider but the camera still rotates, even on PC.

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Disable Cinemachine input on UI touch
« Reply #9 on: May 13, 2020, 03:04:44 AM »
Hi,

 you only (must) need this proxy on the main camera.

Bye,

 Jean