GMS 2.3+ Couple controller questions

Neptune

Member
How can I get analog "angle"?

And for mouse interactions, if I didnt want to make all of them obsolete, would I have to make a custom pointer system to mimic mouse functionality (for playing on consoles)?
Any info appreciated.
 

Slyddar

Member
How can I get analog "angle"?
This is a cut and paste directly from the manual, which I suggest you check out when you have a question. It really is very useful.

This is for the left stick, for device 0, and it sets the direction of the instance running the code to the direction you are pushing the left stick.
Code:
var haxis = gamepad_axis_value(0, gp_axislh);
var vaxis = gamepad_axis_value(0, gp_axislv);
direction = point_direction(0, 0, haxis, vaxis);
Taken from https://manual-en.yoyogames.com/#t=GameMaker_Language/GML_Reference/Game_Input/GamePad_Input/gamepad_axis_value.htm
 

Neptune

Member
Oh interesting, I thought those functions only returned -1,0,1 not decimals in-between.
Makes sense, thanks.
 
Top