Help with game pad support for analog sticks

Aidanranger

  • *
  • Posts: 4
Hi and thanks for reading my question.

I am trying to add gamepad support for my game but I need a bit of help with the analog controls.

I know how to bind the axis to a control but that only allows up, down, left, right and diagonals. I need to be able to have 360 degree control of the player's aim. I am thinking of having the analog's angle set as a variable, instead of a control, but I do not know how to do this.

Could somebody please help me out? Thank you.

jaughnaugh

  • *
  • Posts: 32
Has anyone ever figured this out?? I want to achieve the same.

rob1221

  • *
  • Posts: 9448
An analog stick has X-axis and Y-axis with separate values.  Using the trigonometry blocks you can calculate the current angle of the stick using the "get pressure for control" block.