Results 1 to 2 of 2
  1. #1

    Default Controlling a Mouse Cursor with a Xbox Gamepad?

    So, i have this Scaleform UI inventory menu and it uses a mouse cursor to interact with the objects.
    Now, it works fine when i'm controlling it with a mouse, but i need to be able to controll it with one of the Analog Sticks on the Xbox controller.

    I can get the controller to work in the game in general, so i can control my pawn, attack and even open the Scaleform inventory with it, but i can't get it to work in the GFx.
    Is there a .ini file i have to alter or some kind of function in AS3 that i have to use to get the Analog Stick to control the cursor like the mouse does?

  2. #2
    MSgt. Shooter Person
    Join Date
    Jan 2011
    Posts
    30

    Default

    Read through this.

    I am assuming you are taking the mouse co-ordinates from script and passing them to flash to directly set the position of the mouse. To use a joystick, you will have to translate the position based on the x and y input of the joystick. So, in pseudo code:

    Code:
    mouse.x += clamp( Joystick.X * mouseSensitivity, 0, ScreenWidth )
    mouse.y -= clamp( Joystick.Y * mouseSensitivity, 0, ScreenHeight )


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.