Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / z-axis joystick

Author
Message
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 24th Mar 2016 22:46
Hi All,

There is a x and y-axis control of a real joystick. But how to use the Z-axis of the real joystick? (GetJoystickX(), GetJoystickY(), but there is no GetJoystickZ() )

I can't find it in the help and forum.

There would be a better control for flying airplanes, helis or spaceships, rather than presseing the keyboard.

Anyone got an idee?
Jack
15
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 25th Mar 2016 16:59
Hello Jo Bach,
can you please explain me, what the Z() axis of a controller is?
In the first moment I thought about a levitating ball, that you can modify in position on 3 axis.
I am not so good in consoles / controllers, so there may be a better explaination.


Greetings, Jack


[/url]
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 25th Mar 2016 19:18
Hi Jack,


The Z axis is turning the handle of the joystick (like turning a key in a lock).

If you got an airplane you can turn it on its z-axis.

Look for the image I put with this as the example.

https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/JoystickDirections.svg/436px-JoystickDirections.svg.png

AGK2 can't only read the x and x axis of the (virtual) joystick, but a real joystick can turn on the Z-axis.

It was possible in Dark Basic (yes I am old. LOL ).
Jack
15
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 26th Mar 2016 23:05
Hello Jo Bach,
thank you for the explaination! Maybe you could try to log all joystick inputs and find out the axis, if that one exists.
I have only used 2 axis controllers with AGK.

Cheers, Jack

[/url]
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Mar 2016 10:51
Because this is specific only to Windows, the commands you are looking for are in the Raw command list...

CompleteRawJoystickDetection
GetRawJoystickButtonPressed
GetRawJoystickButtonReleased
GetRawJoystickButtonState
GetRawJoystickConnected
GetRawJoystickExists
GetRawJoystickRX
GetRawJoystickRY
GetRawJoystickRZ
GetRawJoystickX
GetRawJoystickY
GetRawJoystickZ
SetRawJoystickDeadZone
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Jo Bach
4
Years of Service
User Offline
Joined: 22nd Dec 2014
Location:
Posted: 16th Apr 2016 08:40
Hi Batvink,

Thanks for your help.

This is what i need.

Greeting.

Login to post a reply

Server time is: 2019-11-17 19:50:12
Your offset time is: 2019-11-17 19:50:12