User Tag List

Results 1 to 7 of 7

Thread: XBOX Gamepad object and non-XBOX Gamepad

  1. #1
    Clicker Fusion 2.5Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2008
    Location
    Indonesia
    Posts
    694
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XBOX Gamepad object and non-XBOX Gamepad

    Somehow I can't get this object to connect to my gamepad. Has anyone tested it on a non-Xbox gamepad? I'm using Logitech F710 which supports XInput and other game using XBOX controls detected it flawlessly.

  2. #2
    Clicker Fusion 2.5Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2008
    Location
    Indonesia
    Posts
    694
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Joystick 2 was kinda complicated to use and is not pretty much straightforward. I assumed this XBOX Gamepad object would work on any XInput game controllers.
    I made a project once with XNA and C# and the engine could pick up my Logitech gamepad easily. Not sure why it's not working on Fusion.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,020
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe you can make another video tutorial about this, Snail.

  4. #4
    Clicker Fusion 2.5Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2008
    Location
    Indonesia
    Posts
    694
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Somehow the XBOX object is now working properly. Thanks for your answers Snail
    Yeah to provide a tutorial video of Joystick 2 would be really useful for users.

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Jul 2014
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was trying to use the XBOX Controller object for a local multiplayer game but when you add two players, the right stick values for both Xbox Controller 1 and 2 get messed up and start doing crazy things. For example, when you move the right stick down, the value increments until 99 and then it goes to -100, so, when you aim down, it ends up aiming up; and other weird things like this happen to the right stick on controller 2.

    With "Joystick2" I tried to get to move a player with the left stick (no problem doing this) and to move an aim around the character in 360 with the right stick (and also in and out). Because joystick2 handles the right stick in a weird way with values between 0 and 65500 (or something like that) I could not think of a good way to position my aim active object.

    There is an example in the forum (link below) that uses the fact that the Horizontal and Vertical values in the XBOX controller object are between 100 and -100, and places an object (in the example a circle) at an "X Position of the centre + StickRightH / 2"... so, if the right stick is moved to 50, then you place the object at 25 pixels away from the centre and so on. I just do not know what to do with "Joystick2" values (0-65500) that could help me position the aim around my character.

    Here's the link for the Xbox controller example. If someone could explain or recommend a way of positioning an aim around the character using the values from Joystick2 for the right stick, it would be great.

    http://community.clickteam.com/threads/87987-XBOX-Gamepad-Object-examplehttp://community.clickteam.com/threads/87987-XBOX-Gamepad-Object-example

  6. #6
    Clicker Fusion 2.5Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2008
    Location
    Indonesia
    Posts
    694
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was trying to use the XBOX Controller object for a local multiplayer game but when you add two players, the right stick values for both Xbox Controller 1 and 2 get messed up and start doing crazy things. For example, when you move the right stick down, the value increments until 99 and then it goes to -100, so, when you aim down, it ends up aiming up; and other weird things like this happen to the right stick on controller 2.
    Hmm that's weird, I haven't tried to test it with two players. Maybe I'll try to figure it out, although I only have one XInput controller with me at the moment.

    EDIT: I can confirm that the XBOX object will mess up the values with two controllers (or maybe more). I've created a bugbox entry for it. http://bugbox.clickteam.com/issues/2125

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Jul 2014
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for creating the bugbox entry!

    In the meantime, I managed to use the "joystick 2" with some success. I still need to check what happens with more than 1 joystick but I do not think I am going to see the same issue as with the XBOX Controller object.


    I put some thought into how to convert the range 0-65500 to something more acceptable to handle distance and found a way to do it with some calculations.
    For example: if the X-Rotation is 65500 then I do this => ((X-Rotation value - 32767 (center) ) / 1000) => This gives 32 or 33 as a result. If the X-Rotation was 0, then the result is -32 or -33.
    Then, you can use that value to add it to the position of something (like another active object used as an aim), or even multiply it by 1.5, 2 or 3 or whatever and convert it to INT, to adjust the amount of pixels you will be adding.

    The only issue I found with "Joystick 2" is that once you move the rightstick, it almost never goes back to the center value 32767; so, to avoid issues and to confirm if the player is moving, you should not use something like checking if the current X-Rotation is different than 32767 (center). Instead, you should check if the X-rotation is lower than something and higher than something (e.g. < 25000 // > 39000) to counter that lack of precision.
    You would need to o the same for the Y-Rotation.

    Like this you can make an aim that moves close or away to your character depending on the position of the right stick.

    I recommend for everyone to check, Snail's tutorial in youtube for the Joystick2 object that shows you how to debug it and see the values I am talking about. If you check that, you will be able to tweak the movement to your liking.

    Regards,

Similar Threads

  1. [Request] Xinput (360/XB1 gamepad) object
    By bhlaab in forum Extension Development
    Replies: 2
    Last Post: 28th June 2014, 11:54 AM
  2. lib xbox gamepad.mfx
    By nuagedan100 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd August 2012, 04:04 AM
  3. XBox Gamepad bugs with C++ runtime
    By K1kk0z90 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th July 2012, 01:06 PM
  4. Using the XBOX Gamepad object for a Windows XNA application
    By Francois in forum XNA Export Module Version 2.0
    Replies: 1
    Last Post: 19th June 2012, 10:52 AM
  5. Is the 'Xbox gamepad object' incomplete?
    By King_Cool in forum XNA Export Module Version 2.0
    Replies: 4
    Last Post: 30th January 2012, 07:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •