What's new

Solved Getting analogue stick position

  • Thread starter Deleted member 552650
  • Start date
  • Views 512
D

Deleted member 552650

Freeze Menu
Messages
756
Reaction score
415
Points
175
Sin$
0
In the native
GET_POSITION_OF_ANALOGUE_STICKS(uint padIndex, uint *pLeftX, uint *pLeftY, uint *pRightX, uint *pRightY);
I'm trying to get it so when you move the R Stick is moves an object. What numbers do the analogue sticks go from. What I mean by that is that for example when you're displaying something on your screen it goes from 0.0000 to 1.0000 so how would these go?
 
E

Evil Blunt

Getting There
Platinum Record
Messages
958
Reaction score
1,491
Points
245
Sin$
7
The numbers start at 0 meaning no analog stick is moved then when you move stick allway to the left it will go to - 127 and for allway to the right will be 128.
 
Upvote 0
Majestic Mods

Majestic Mods

Newbie
Messages
12
Reaction score
2
Points
45
Sin$
0
In the native
GET_POSITION_OF_ANALOGUE_STICKS(uint padIndex, uint *pLeftX, uint *pLeftY, uint *pRightX, uint *pRightY);
I'm trying to get it so when you move the R Stick is moves an object. What numbers do the analogue sticks go from. What I mean by that is that for example when you're displaying something on your screen it goes from 0.0000 to 1.0000 so how would these go?
Just use the XYZH sco in MDV5 or in v4.3 can't remember what version but I know it's one of them not sure who updated it but it gives the ANALOGUE sticks too
 
Upvote 0
D

Deleted member 552650

Freeze Menu
Messages
756
Reaction score
415
Points
175
Sin$
0
Just use the XYZH sco in MDV5 or in v4.3 can't remember what version but I know it's one of them not sure who updated it but it gives the ANALOGUE sticks too
I'm getting the analogue stick position for a reason... I'm not getting my char heading!! Why are you commenting on old threads that no one is using?
 
Upvote 0
cannedheat

cannedheat

Enthusiast
Messages
538
Reaction score
300
Points
150
Sin$
0
I wanted to know the same thing a while ago so i made a quick displayer to show what the values were doing, its here if you want to put this in.

Code:
int toggle = FALSE;
     if ( IS_GAME_KEYBOARD_KEY_JUST_PRESSED(KEY_NUMLOCK_5) ) toggle = !toggle;
     if ( toggle )
     {
        int left_x, left_y, right_x, right_y;
        GET_POSITION_OF_ANALOGUE_STICKS(0, &left_x, &left_y, &right_x, &right_y);
        SetFont( 0, 255, 0 );
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.8f, "NUMBER", left_x);
        USE_PREVIOUS_FONT_SETTINGS();
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.84f, "NUMBER", left_y);
        USE_PREVIOUS_FONT_SETTINGS();
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.88f, "NUMBER", right_x);
        USE_PREVIOUS_FONT_SETTINGS();
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.92f, "NUMBER", right_y);
     }
 
Upvote 0
D

Deleted member 552650

Freeze Menu
Messages
756
Reaction score
415
Points
175
Sin$
0
I wanted to know the same thing a while ago so i made a quick displayer to show what the values were doing, its here if you want to put this in.

Code:
int toggle = FALSE;
     if ( IS_GAME_KEYBOARD_KEY_JUST_PRESSED(KEY_NUMLOCK_5) ) toggle = !toggle;
     if ( toggle )
     {
        int left_x, left_y, right_x, right_y;
        GET_POSITION_OF_ANALOGUE_STICKS(0, &left_x, &left_y, &right_x, &right_y);
        SetFont( 0, 255, 0 );
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.8f, "NUMBER", left_x);
        USE_PREVIOUS_FONT_SETTINGS();
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.84f, "NUMBER", left_y);
        USE_PREVIOUS_FONT_SETTINGS();
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.88f, "NUMBER", right_x);
        USE_PREVIOUS_FONT_SETTINGS();
        DISPLAY_TEXT_WITH_NUMBER(0.48f, 0.92f, "NUMBER", right_y);
     }
Thanks but this thread is like 2 weeks old and I already figured this stuff out....
 
Upvote 0
Top Bottom
Login
Register