playMaker

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

westingtyler

  • Full Member
  • ***
  • Posts: 232
    • 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: 14593
  • 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: 14593
  • 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: 232
    • 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: 14593
  • 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: 14593
  • 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

westingtyler

  • Full Member
  • ***
  • Posts: 232
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Re: Cinemachine AxisState set properties - value and max speed
« Reply #6 on: October 28, 2019, 05:50:24 PM »
cool. I'd love to check this out, but where is the proxy located? I mean, where do I download these updated files from? These updated files are not present in my project already.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14593
  • Official Playmaker Support
    • View Profile
Re: Cinemachine AxisState set properties - value and max speed
« Reply #7 on: October 28, 2019, 11:55:59 PM »
Hi,

 you need to update the package from the Ecosystem browser. the new actions are in there. so search for cinemachine and download the package and install it.

Bye,

 Jean

westingtyler

  • Full Member
  • ***
  • Posts: 232
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Re: Cinemachine AxisState set properties - value and max speed
« Reply #8 on: October 31, 2019, 06:44:03 PM »
oh, great! These are great, but I haven't quite solved my issue. I need to copy the Y and X axes of the free look cameras, before transitioning to others. I actually solved it MOSTLY by using the "inherit position" tick box I never saw before, but the problem remains when transferring away from the 1st person camera (virtual camera) to the 3rd person cameras (free look cameras). when I transition from 1st to 3rd, it seems it TRIES to inherit the position but can't find the Y and X axis settings from the 1st person virtual camera, so it defaults to Y=1 and X=90

I need to somehow get the 1st person Virtual Camera's Aim > POV > Vertical Axis > Value and Horizontal Axis > Value float settings, convert those to correct Y and Z rotation settings, and paste those into the "inherited position" of the 3rd person camera in its Y axis and X axis. I've attached a picture of what I need to do.

I need to be able to get and set these float properties but cannot figure out how. I can do float remap and convert/normalize them, if I can just figure out how to retrieve and set them.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14593
  • Official Playmaker Support
    • View Profile
Re: Cinemachine AxisState set properties - value and max speed
« Reply #9 on: November 01, 2019, 12:17:46 AM »
Hi,

 It seems to me that you are working against Cinemachine workflow.

 each different point of view needs a virtual camera and then you can use a blending component to choose which camera to use, and animating/transitioning between them becomes a matter of adjusting blending weights.

Can you confirm this is what you are trying to achieve?

I would first ask on Cinemachine forum what you are trying to achieve and how it can be done with cinemachine as is, and if indeed you need programming, then let's see what they come up with and I'll port that to PlayMaker.


Bye,

 Jean