playMaker

Author Topic: Can I use playmaker alone to create Twin Stick controls? [SOLVED]  (Read 1700 times)

simon

  • Playmaker Newbie
  • *
  • Posts: 17
Hi,

First time playmaker user.

Was following this tutorial:


Instead of the mouse, I wanted the right analogue stick of my xbox 360 controller driving the aim of the ship. Can I still do this all within playmaker?

I've found two forum posts to do with this:

http://hutonggames.com/playmakerforum/index.php?topic=6559.msg31999#msg31999

/\ I couldn't seem to get this working.

http://hutonggames.com/playmakerforum/index.php?topic=11542.0

/\ This one requires code which, as an artist, I was trying to avoid.


I don't mind getting my hands dirty, but I'm a little surprised that a simple twin stick mechanic isn't so easy to implement using playmaker. I hope someone can prove me wrong?
« Last Edit: December 19, 2017, 03:43:29 AM by simon »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Can I use playmaker alone to create Twin Stick controls?
« Reply #1 on: December 18, 2017, 05:13:24 AM »
Hi,
You can use the get axis,
but you might need to set your right analogue in the input manager.
Horizontal and vertical are probably set to the left analogue stick.

Go to Edit/Project Settings/Input to add or edit the right analogue stick.
Then then use the names you have set for the stick.

You can use the axis result on a rotate action to rotate the object.
Play around with the multiplier to get the right speed.

There are some damp actions on the Ecosystem  if you need some damping on the rotation.

If you can't get it to work i can make a sample by Wednesday (not home atm and was not allowed to bring my laptop from the wife :P )

simon

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Can I use playmaker alone to create Twin Stick controls?
« Reply #2 on: December 18, 2017, 11:52:11 PM »
Djaydino,

Thanks for the reply.

Unfortunately that doesn't seem to help me, though I might be missing something very obvious, so I've uploaded some screenshots of what I've set up.

States: how I have my player states set up.

Input: The axes I'm trying to use to rotate the player. At the moment I'm trying JUST to get the axes to rotate my player, so as you can see, I'm only using one. Gotta walk before you can run...

P.S:

When does the post verification stop??

Warm regards,

Simon.



simon

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Can I use playmaker alone to create Twin Stick controls?
« Reply #3 on: December 19, 2017, 12:22:18 AM »
After some poking around, I found out that the keyboard keys assigned to that axes DO make the ship rotate. But because I forgot to set the control type of the axis to 'joystick', the 360 controller's right analogue wouldn't work with it.

Now THAT'S solved, but that's just one thing.

All I really want is that my player will look in any direction I have my right stick pointed. I'm currently trying to work that out...

EDIT:

GOT IT.

you do a get axis vector state and assign a 'rotation' vector 3 Variable.
Make it relative to what ever camera you are viewing the game with.

You then add a 'Smooth Look At Direction' and plugin the rotation.

I had to invert the Y axis of my aim axes, and removed the 'snap' features so my character didn't flick back in the other direction after I aimed him.
« Last Edit: December 19, 2017, 01:04:43 AM by simon »