playMaker

Author Topic: Cinemachine AxisState set properties - value and max speed  (Read 144 times)

westingtyler

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Cinemachine AxisState set properties - value and max speed
« on: September 14, 2019, 06:33:20 AM »
When characters go into menus, the right thumbstick should no longer rotate the cinemachine camera. I want to therefore set the Max Speed for the Y and X AxisStates, to 0, then back to their normal speed upon menu exit.

I also want to set the Value for the X and Y axes as well to prevent whipping during transitions between cameras. (get current camera's y value, set target camera's y value to that, do transition.) currently it doesn't keep all updated in their rotation, so going into first person mode, THAT camera might be facing back the other way from the direction of the 3rd person camera, causing disorientation upon switching.

But I cannot find in the playmaker actions, or in Set Property, where to set the values or the max speed for the axis states. There's like a billion euler angles and local rotation and rotation variables, but none of them seem to correspond to what I need.

The actions need to work in FreeLook AND Virtual Camera components. In the Cinemachine FreeLook script, I've found where the variables are but don't know how to access them at runtime using playmaker:

[AxisStateProperty]
        public AxisState m_YAxis = new AxisState(0, 1, false, true, 2f, 0.2f, 0.1f, "Mouse Y", false);.
« Last Edit: September 14, 2019, 06:37:37 AM by westingtyler »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14501
  • Official Playmaker Support
    • View Profile
Re: Cinemachine AxisState set properties - value and max speed
« Reply #1 on: September 17, 2019, 01:36:21 AM »
Hi,

 That's not a nice option, let me add a feature on my input proxy to account for that.

I'll publish tomorow

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14501
  • Official Playmaker Support
    • View Profile
Re: Cinemachine AxisState set properties - value and max speed
« Reply #2 on: September 20, 2019, 12:00:11 AM »
Hi,


ok, new version up.

use the CinemachineCoreGetInputTouchAxis component, there is a Inputenable property on this.

 use then the action EnableCoreInput on that component to turn on and off inputs.

Bye,

 Jean

westingtyler

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Re: Cinemachine AxisState set properties - value and max speed
« Reply #3 on: September 20, 2019, 03:29:30 AM »
thanks! where is this proxy located?

also, does this cover the second part, where I need to get and set the Y value of the cameras before transitions to prevent whipping/facing the wrong direction afterward?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14501
  • Official Playmaker Support
    • View Profile
Re: Cinemachine AxisState set properties - value and max speed
« Reply #4 on: September 20, 2019, 03:58:37 AM »
Hi,

just search for CinemachineCoreGetInputTouchAxis component in your assets.

 I haven't done the offset yet, will do that this afternoon.

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14501
  • Official Playmaker Support
    • View Profile
Re: Cinemachine AxisState set properties - value and max speed
« Reply #5 on: September 20, 2019, 05:19:36 AM »
hi,

 done, new action CameraOffsetGetProperties and CameraOffsetSetProperties