playMaker

Author Topic: Inputs for controller?  (Read 4463 times)

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Inputs for controller?
« on: June 27, 2013, 11:10:23 AM »
Hi guys, so I'm fiddling around with controlling a character via an xbox 360 controller / gamepad. I have movement nailed down because the left stick is defined in project InputManager already, but I need the right stick to control rotation of the character (top-down style where the right stick rotates the character to whatever direction you are pushing it at, and the left stick moves the character in whatever direction you are pressing. this means if i press the left stick down and the right stick up, then the character will LOOK upwards while WALKING downwards (backwards)

As said, i have the movement part working and rotation is working with a mouse right now (character just faces the mouse pick position all the time)

but I can't seem to figure out how to add the left stick in the inputmanager? =( and how do i access the input and translate that to a rotation of the character? and ugh.. im just really lost on how to make this work

Anybody able to help? Any suggestions will be received with awkward hugs!
Remember, you don't fail unless you give up trying to succeed!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Inputs for controller?
« Reply #1 on: June 27, 2013, 02:12:21 PM »
Hi,

 you need to make a new entry in the Input settings manager and know exactly what joystick axis you need to refer. then you'll get your Input values.

http://wiki.etc.cmu.edu/unity3d/index.php/Joystick/Controller

bye,

 Jean

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Inputs for controller?
« Reply #2 on: June 29, 2013, 09:27:26 AM »
Thanks alot Jean, I will try this out :)
Remember, you don't fail unless you give up trying to succeed!