playMaker

Author Topic: Rewired/Cinemachine Actions discussion  (Read 13414 times)

Guavaman

  • Playmaker Newbie
  • *
  • Posts: 38
Re: Rewired/Cinemachine Actions discussion
« Reply #30 on: August 22, 2018, 03:12:57 AM »
WOOOOW No wonder I using ReWired mouse inputs to control the cameras through joystick instead of using Controller inputs.

This statement is quite confusing to me. What do you mean by "using Rewired mouse inputs?" If you are using Rewired to control the camera with a joystick, you're using Rewired to control the camera with a joystick. There's no way possible you could be accidentally using the mouse to control a joystick.

In Rewired, there are nothing but:
Actions
Controller Maps

Your Actions can be named whatever you want. You can call them:
Look X
Mouse X
Upside-down Flying Ninja Robot Zombie Pizza from Galaxy X

Regardless of the name, they are all exactly the same.

To use these Actions, you must create some Controller Maps for the different controller types you want to support.

When you create a Controller Map for a Joystick, you are creating bindings between joystick elements and Actions.

When you create a Controller Map for a Mouse, you are creating binding between mouse elements and Actions.

Even if that Action's name was "Mouse X", when you made a Joystick Map using that Action, it's equally as valid as making a Joystick Map with an Action named "Look X." There's absolutely no difference.

If you were using Actions in Rewired called "Mouse X" and "Mouse Y" and making Joystick Maps with those two Actions, that's perfectly valid and will work. You will get the exact same result as if you change the names to "Look X" and "Look Y".

Sorry for the confusion By Mouse X and Y I was referring to the Mouse Axis. I thought ReWired Cinemachine integration only worked with those. I'm well aware that naming conventions don't matter in this case but thank you once again! :)

Are you saying you were using ReInput.controllers.Mouse to get the values of the mouse directly? Because if you're using Player-Actions, you're using whatever current input device is mapped to those Actions and assigned to the Player whether it be a mouse, joystick, or keyboard.

Alright I opened unity up so I can retrace everything I did so there wont be any more confusion. (Sorry in advance  :'( my ReWired terminology is all off)

Heres What I did:

I used a mouse map for the right analog sticks and assigned mouse horizontal and mouse Vertical in the element section. I then assigned the mouse map to the player. At the time I thought only mouse maps would work with the integration.

Thanks for explaining. My confusion is coming from your mixture of joystick terms in while you're talking about the mouse. Here you say you used a mouse map for the "right analog sticks" which doesn't make sense to me because the mouse has no relationship to any analog sticks and a mouse map cannot be used on a joystick. If I understand correctly, you mean you created mouse map to control the Cinemachine camera's X and Y axes, but you did not know you could also map these actions on a Joystick Map and use a joystick to control the camera. That makes sense if that's the case.
« Last Edit: August 22, 2018, 03:14:32 AM by Guavaman »

mrminico

  • Full Member
  • ***
  • Posts: 129
Re: Rewired/Cinemachine Actions discussion
« Reply #31 on: August 23, 2018, 03:59:05 AM »
Quote
Thanks for explaining. My confusion is coming from your mixture of joystick terms in while you're talking about the mouse. Here you say you used a mouse map for the "right analog sticks" which doesn't make sense to me because the mouse has no relationship to any analog sticks and a mouse map cannot be used on a joystick. If I understand correctly, you mean you created mouse map to control the Cinemachine camera's X and Y axes, but you did not know you could also map these actions on a Joystick Map and use a joystick to control the camera. That makes sense if that's the case.

Yesss! Exactly that sorry for the confusion. But that's exactly what I did I'll be trying the joystick map as soon as I'm back the project that uses ReWired. You have been phenomenally helpful Guavaman! Thanks for all the support and assistance. If there's anything else in regards to Playmaker / ReWired I'll make sure to mention you. I'll come back here once I've experimented with the updated cinemachine integration just to let you know that everything is okay.

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: Rewired/Cinemachine Actions discussion
« Reply #32 on: August 23, 2018, 04:25:58 PM »
Thanks for starting this thread and for the updates Guavaman! I'd been keeping tabs over on the Unity Forum for a workaround for this, so its nice to see it officially integrated :D

Guavaman

  • Playmaker Newbie
  • *
  • Posts: 38
Re: Rewired/Cinemachine Actions discussion
« Reply #33 on: August 24, 2018, 12:54:03 AM »
Thanks!