playMaker

Author Topic: Rewired (polling) Actions  (Read 12647 times)

strange_aeons

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
Re: Rewired (polling) Actions
« Reply #45 on: November 23, 2015, 04:06:12 PM »
would anyone know how i could change an existing action that gets input from unity input manager to take input from rewired? i need the playmaker action Get Axis Vector to accept Rewired "actions".

Guavaman

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Rewired (polling) Actions
« Reply #46 on: November 24, 2015, 01:15:28 PM »
would anyone know how i could change an existing action that gets input from unity input manager to take input from rewired? i need the playmaker action Get Axis Vector to accept Rewired "actions".

This does not sound like the right approach. You're essentially trying to turn the default input Actions into the Rewired Actions. Why? So you don't have to replace the Actions in your FSMs with the Rewired versions? This is not a good idea for many reasons, for example you won't be able to update Playmaker without overwriting your changes.

If you _really_ want to do this, you're going to have to make a lot of changes to the input Actions so they take the variables Rewired needs and call the Rewired methods. If you don't know C# well or how to write custom Actions, this is going to be a difficult task for you.

strange_aeons

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
Re: Rewired (polling) Actions
« Reply #47 on: November 24, 2015, 06:42:29 PM »
oh god, starting to feel so dumb. i really dont want to do that plan, i had the naive idea that it would be just a matter of changing a variable or something and then saving it as a new action so it would be seperate from the original Get Axis Vector. i do use the Rewired actions you made and they are great, i guess this is just me trying to figure out how achieve something i'd managed to do before i got Rewired.

so now i think in theory, i should be able to do the exact same thing by using Rewired Player Get Axis, for both axis. then put that input into Get Position, which takes float variables and puts them both into a vector3 variable. is that the same as Get Axis Vector? im not at home now, so i will have to try it later

Guavaman

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Rewired (polling) Actions
« Reply #48 on: November 24, 2015, 08:31:45 PM »
oh god, starting to feel so dumb. i really dont want to do that plan, i had the naive idea that it would be just a matter of changing a variable or something and then saving it as a new action so it would be seperate from the original Get Axis Vector. i do use the Rewired actions you made and they are great, i guess this is just me trying to figure out how achieve something i'd managed to do before i got Rewired.

so now i think in theory, i should be able to do the exact same thing by using Rewired Player Get Axis, for both axis. then put that input into Get Position, which takes float variables and puts them both into a vector3 variable. is that the same as Get Axis Vector? im not at home now, so i will have to try it later

I don't know exactly what you're trying to achieve, but Rewired has Actions for both GetAxis and GetAxis2D. GetAxis returns a float from -1 to 1 and GetAxis2D returns a Vector2 between -1, -1 and 1, 1.

Directly putting joystick axes into a transform position vector isn't going to work. You'd just be setting the position to a range between -1 and +1 on one or all axes.

strange_aeons

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
Re: Rewired (polling) Actions
« Reply #49 on: November 24, 2015, 09:00:19 PM »
trying to achieve this kind of behavior on a player.

https://www.youtube.com/watch?v=ZCf21xBeBQI

as you said, that directly putting joystick axis into a transform position vector would just set the a position between -1 and 1, but would i be able to then put the Smooth Look At action to cause the player to look at that direction (using the Right Stick on xbox360 controller). this is not to achieve movement, just just to control the direction the player is facing. going to leave here shortly and will try it out.

craigz

  • Junior Playmaker
  • **
  • Posts: 68
    • View Profile
    • Haven Made
Re: Rewired (polling) Actions
« Reply #50 on: June 26, 2016, 03:59:57 PM »
trying to achieve this kind of behavior on a player.

https://www.youtube.com/watch?v=ZCf21xBeBQI

as you said, that directly putting joystick axis into a transform position vector would just set the a position between -1 and 1, but would i be able to then put the Smooth Look At action to cause the player to look at that direction (using the Right Stick on xbox360 controller). this is not to achieve movement, just just to control the direction the player is facing. going to leave here shortly and will try it out.

Sorry to revive this! Has anyone been able to get this type of thing working? (player turning to face direction of movement)

I know there's the Rewired Get Axis 2D, but the PlayMaker Get Axis Vector is doing some other calculations on top of getting the input?


DennisJensen

  • Junior Playmaker
  • **
  • Posts: 84
    • View Profile
Re: Rewired (polling) Actions
« Reply #51 on: September 27, 2017, 06:26:20 AM »
Hey Guys,

So I looked at the example files how to assign joysticks based on button press.

Does this work with playmaker actions as well? Since I'm unable to find the joystick.GetAnyButtonDown

I would like to use this in a way where the player presses "A" and then joins, but it can be two players on keyboard and two on joysticks.

Cheers
/Dennis
Game Designer, CEO, Artist
http://2ndStudio.com