Forums » Technology » Flight Sim Controllers » T.A.R.G.E.T. (Thrustmaster) » Centering a relative mapped Axis Active Topics You are not logged in. [Log In] [Register User]
Topic Options
Rate This Topic
Hop to:
#3398107 - 09/26/11 05:16 PM Centering a relative mapped Axis
Madog Offline
Junior Member

Registered: 06/04/08
Posts: 7
Hey, i'm using
MapKey(&Joystick, S4, EXEC("MapAxis(&Throttle, SCX, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_RELATIVE);
SetSCurve(&Throttle, SCX, 0, 10, 0, 4, -10);
MapAxis(&Throttle, SCY, DX_THROTTLE_AXIS, AXIS_NORMAL, MAP_RELATIVE);
SetSCurve(&Throttle, SCY, 0, 10, 0, 4, -10);")
);
MapKeyR(&Joystick, S4, EXEC("MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0);")
);
to toggle between ABSOLUTE mapped axis for the cursors, etc. and RELATIVE mapped axis for view control. My problem is this: i am not able to force the RELATIVE mapped axis to center, effectively centering the view.

Does someone know how center an relative mapped axis?

Thanks in advance,

Madog


Top
#3398122 - 09/26/11 05:29 PM Re: Centering a relative mapped Axis [Re: Madog]
Madog Offline
Junior Member

Registered: 06/04/08
Posts: 7
Nevermind, wrote my own centering function, works like a charm:

int CenterAxis(alias o, int x, int index)
{
if(!GetAxisData(&o, x)) return 0;
DXSetAxis(index, 0);
axdata.relpos = 0;
}
MapKey(&Throttle, SC, CHAIN(EXEC("CenterAxis(&Throttle, SCX, DX_SLIDER_AXIS);"), EXEC("CenterAxis(&Throttle, SCY, DX_THROTTLE_AXIS);")));


Edited by Madog (09/27/11 09:17 AM)

Top

Topic Options
Rate This Topic
Hop to:

Moderator:  RacerGT 
 
Quick Search
Recent Articles
Support SimHQ with these links


Social


Recent Topics
Who is the better Quarterback?
by Plainsman
11:21 PM
A2A P-51D Ain't Misbehavin uploaded
by Tom_Weiss
09:15 PM
Opinions on REX4
by malibu43
08:13 PM
New Uhtred book later this year!
by Jayhawk
07:50 PM
Star Trek: the animated series
by letterboy1
07:45 PM
First Pitts Practice for 2014: New External GoPro
by Smokin_Hole
07:16 PM
I need an intervention.
by - Ice
06:02 PM
System Shock 2
by Snakeyes
04:31 PM
What we all want to do sometimes
by DaBBQ
04:22 PM
Big radios in WW2 (CMRT screen)
by Magnum
04:00 PM
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2013, SimHQ Inc. All Rights Reserved.