Right Thumbstick on xbox 360 controller

Has anyone been able to get blender to recognize the right thumbstick properly on a 360 controller? I can get it to work in the up/down direction by using index 0 number 2 and left/right axis. No matter what settings I choose, I can’t get Blender to receive input from the left/right direction on the right thumbstick. Anyone have any insight?

I have had the same problem, I really need some help with this.

I have had the same problem, I really need some help with this.
Same here.

I’ve never tried it for myself, but couldn’t you use some of the joystick features from pygame? Try it once and see what happens.

Where can I submit this as a bug/feature request?

at the blender site i guess.
well, heres how someone for left 4 dead did it with some script.

unbindall                // Prevent mouse/keyboard control when gamepad is in use (to prevent autoaim exploit)

joystick 1
joy_advanced "1"            // use advanced joystick options (allows for multiple axes)

joy_name "L4D Xbox360 Joystick Configuration"
joy_advaxisx 3                // x-axis controls GAME_AXIS_SIDE (strafing left and right)
joy_advaxisy 1                // y-axis controls GAME_AXIS_FORWARD (move forward and back)
joy_advaxisz 0                // z-axis is treated like a button
joy_advaxisr 2                // r-axis controls GAME_AXIS_PITCH (look up and down)
joy_advaxisu 4                // u-axis controls GAME_AXIS_YAW (look left and right)
joy_advaxisv 0                // v-axis is unused
joy_forwardsensitivity -1.0    // movement sensitivity
joy_sidesensitivity 1.0
joy_forwardthreshold 0.1    // movement dead zone settings
joy_sidethreshold 0.1
joy_pitchsensitivity 1.0    // look sensitivity
joy_yawsensitivity -1.5
joy_pitchthreshold 0.1        // look dead zone settings
joy_yawthreshold 0.0

joy_variable_frametime 1
joy_autoaimdampenrange 0.85
joy_autoaimdampen 0.5
joy_lowend 0.65
joy_lowmap 0.15
joy_accelscale 3.0
joy_accelmax 4.0
joy_response_move 5
joy_response_look 1
joy_autoaimdampen 0.3
joy_autoaimdampenrange 0.85
joyadvancedupdate            // advanced joystick update allows for analog control of move and look

// Alternate control 1
+jlook                    // enable joystick look
bind "A_BUTTON" "+jump;+menuAccept"        // (A) button - Jump  -menuAccpt allows us to make selections on hud menus
bind "B_BUTTON" "+reload"            // (B) button - Reload
bind "X_BUTTON" "+use"                // (X) Use
bind "Y_BUTTON" "lastinv"            // (Y) button - swap pistol/rifle or z_abort -used to respawn as a ghost.
bind "R_TRIGGER" "+attack"            // RT - Main weapon - Primary trigger
bind "L_TRIGGER" "+attack2"            // LT - Melee
bind "R_SHOULDER" "+lookspin"            // RB - Fast 180 spin
bind "L_SHOULDER" "toggle_duck"            // LB - Duck
bind "STICK1" "vocalize smartlook"        // LS - vocalize
bind "STICK2" "+zoom"                // RS click - Rifle Zoom

// Fixed bindings, do not change these across joystick presets
bind "BACK" "togglescores"            // (back) button - scores
bind "START" "gameui_activate"        // (start) button - pause
bind "S1_UP" "+menuUp"                // Hud menu Up
bind "S1_DOWN" "+menuDown"            // Hud menu Down
bind "UP" "impulse 100"                // DPad Up - Toggle flashlight
bind "LEFT" "slot3"                    // DPad Left - grenade
bind "RIGHT" "slot4"                // DPad Right - health
bind "DOWN" "slot5"                    // DPad Down - Pills


// controller2 bindings
+jlook                    // enable joystick look
cmd2 bind "A_BUTTON" "+jump;+menuAccept"        // (A) button - Jump  -menuAccpt allows us to make selections on hud menus
cmd2 bind "B_BUTTON" "+reload"            // (B) button - Reload
cmd2 bind "X_BUTTON" "+use"                // (X) Use
cmd2 bind "Y_BUTTON" "lastinv"            // (Y) button - swap pistol/rifle or z_abort -used to respawn as a ghost.
cmd2 bind "R_TRIGGER" "+attack"            // RT - Main weapon - Primary trigger
cmd2 bind "L_TRIGGER" "+attack2"            // LT - Melee
cmd2 bind "R_SHOULDER" "+lookspin"            // RB - Fast 180 spin
cmd2 bind "L_SHOULDER" "toggle_duck"            // LB - Duck - is also used to give objects to people.
cmd2 bind "STICK1" "vocalize smartlook"        // LS - vocalize
cmd2 bind "STICK2" "+zoom"                // RS click - Rifle Zoom

// Fixed bindings, do not change these across joystick presets
cmd2 bind "BACK" "togglescores"            // (back) button - scores
cmd2 bind "START" "gameui_activate"        // (start) button - pause
cmd2 bind "S1_UP" "+menuUp"                // Hud menu Up
cmd2 bind "S1_DOWN" "+menuDown"            // Hud menu Down
cmd2 bind "UP" "impulse 100"                // DPad Up - Toggle flashlight
cmd2 bind "LEFT" "slot3"                    // DPad Left - grenade
cmd2 bind "RIGHT" "slot4"                // DPad Right - health
cmd2 bind "DOWN" "slot5"                    // DPad Down - Pills


sk_autoaim_mode 2

i know its not python, but it might be inspiring?

That script doesn’t really help. The problem is blender doesn’t recognize the axis.

I’m actually surprised that more people don’t see this as a problem. Do other game controllers work with blender? Are most people not making games that can be played with console controllers?

If Blender is being pushed as an engine for easy prototyping, I would think getting console controllers to work with it would be a priority.

I’m submitting it on the blender site as bug. I really hope it gets fixed, because I can’t work with bge without controller support.

on the other hand, it really is primarily a rapid prototyping engine anyway, so it shouldn’t really matter much… If you really want to go into advanced game design, something like Ogre 3D with PhysX, SDL, and OpenAL is much more suited…

I can get the GE to recognize 2 Playstation (1) controllers through using a USB adapter. Pressing the ‘Analog’ button on them lets you use both left and right sticks as Axis[0] through [3]. However, a friend of mine has a generic dual analog controller, and the axis on his map entirely different. That is axis [3] is up/down on my right analog stick, but is left/right on his right analog joystick.
We tried two more generic controllers to compare results with, and they don’t work at all in the engine, but do appear under game controllers in Windows Device Manager. So apparently joysticks are still a little buggy.

If you do use Pygame, your joystick will return 0 to 1.0 values rather than 0-32,000ish values per axis, which makes it much easier to deal with if you are using a joystick to alter object orientation matrices.

I am going to try to make an axis configuration saving script to counter this if possible. My game is meant to be played with two dual analog joysticks.

Im having problems also with the joystick sensor. I did get it to work on a logitech controller but not on my microsoft one. My logitech has a pad and analog stick just like the playstation controllers, when I switch to the analog it goes wild, switch back to the pad it works fine.:confused:

Apricot gave us a push forward not a leap. Some things are still in early stage while others advance really fast. Maybe another game project like apricot will help improve some of these features.:yes:

i know it dont, its not python.

here is a script based on this blend file’s mouselook script found here http://blenderartists.org/forum/showthread.php?t=148218 modified to use the right thumb stick of the xbox360 controller as the mouse look

my setup is
blender trunk
gentoo amd64
and the user space driver “xboxdrv” http://pingus.seul.org/~grumbel/xboxdrv/

#xbox360_camera-look 


# Based on 3rdperson_template_lt_01.blend mouselook by
# Cray, PhilB
#modified by ewomer

#The thread related to this template is located there :
#http://blenderartists.org/forum/showthread.php?t=148218    
#For more informations, please ask there.

#About Cray, PhilB : www.aandria.com

#Tutorial for using MouseLook.py by Clark Thames can be found at
#    www.tutorialsforblender3D.com

# - Capped Mouselook Script thanks to B3D00

import Rasterizer as r
import GameLogic as g

cont=g.getCurrentController()
own=cont.owner

if hasattr(own, 'x')==0:
    own['x'] = 0.0

joy=cont.sensors["joyAxis"]


axis = joy.axisValues


motionX=cont.actuators["motionX"]
motionY=cont.actuators["motionY"]

if joy.positive:
    sensX=own['sensX']/own['sensX_scale'] #leftright  sensitivity
    sensY=own['sensY']/own['sensY_scale'] #
    
    own['posX']=(r.getWindowWidth()/2-axis[2])*sensX-0.000271
    own['posY']=(r.getWindowHeight()/2-axis[3])*sensY-0.000678
    
    print "posX ",own['posX']
    print "posY ",own['posY']
    
    #        top limit           bottom limit
    if own['x']<=-.8 and own['posX']<0 or own['x']>=.5 and own['posY']>0:
        own['posY'] = 0.0
    own['x']+=own['posY']
        
    motionX.dRot = [0.0,0.0,own['posX']]
    motionY.dRot = [own['posY'],0.0,0.0]
else:
    motionX.dRot = [0.0,0.0,0.0]
    motionY.dRot = [0.0,0.0,0.0]
    own['posX']=0.0
    own['posY']=0.0

print "axis: X ",axis
print "posX ",own['posX']
print "posY ",own['posY']

cont.activate("motionX")
cont.activate("motionY")
#r.setMousePosition(r.getWindowWidth()/2,r.getWindowHeight()/2)

#r.setMousePosition(r.getWindowWidth()/2,r.getWindowHeight()/2)
import GameLogic as g

control = g.getCurrentController()

objList = g.getCurrentScene().getObjectList()

cam_par = objList["OBcamera_parent"]
cam_pos = objList["OBcamera_position"]
cam_pivot = control.getOwner()

ob,hit,normal = cam_pivot.rayCast( cam_pos, cam_pivot, 0.0, "wall", 0, 1)

if hit != None:
    cam_par.setPosition(hit)

else:    
    cam_par.setPosition(cam_pos.getPosition())    

#----[ notes ]--------------------------------------------------------------------
#
# This script sends a ray from the "Camera_Pivot"
# to the "Camera_Position" empty,
# if the ray hits a wall property the camera is moved to the hit position.
# if the ray does not hit the wall, the camera is moved
# to the "Camera_Position" empty.
    
# The original idea was from ST150's camera collision setup
# www.blending-online.co.uk

here is the blend file http://www.pasteall.org/blend/97

Right Thumbstick:
Up = Index 0, number 2, axis, up axis
Down = Index 0, number 2, axis, down axis
Left = Index 0, number 3, axis, left axis
Right = Index 0, number 3, axis, right axis

Left Thumbstick:
Up = Index 0, number 1, axis, up axis
Down = Index 0, number 1, axis, down axis
Left = Index 0, number 1, axis, left axis
Right = Index 0, number 1, axis, right axis

Left Trigger = Index 0, number 2, axis, right axis
Right Trigger = Index 0, number 2, axis, left axis
The problem here is that you can’t hold both triggers at once, because one will cancel the other out.

A = Index 0, Button, number 0
B = Index 0, Button, number 1
X = Index 0, Button, number 2
Y = Index 0, Button, number 3

Left Shoulder = Index 0, Button, number 4
Right Shoulder = Index 0, Button, number 5

Back = Index 0, Button, number 6
Start = Index 0, Button, number 7

Hope this helped. It actually helped me to write it down at last too!
Cheers
Wayne

right thumbstick aint responing for me ?
On axis it only goes to 2

For Blender 2.59.0 you can use Single Axis.

Right Thumbstick:
Up = Index 0, number 4, single axis, up axis
Down = Index 0, number 4, single axis, down axis
Left = Index 0, number 5, single axis, left axis
Right = Index 0, number 5, single axis, right axis

Left Thumbstick:
Up = Index 0, number 2, single axis, up axis
Down = Index 0, number 2, single axis, down axis
Left = Index 0, number 1, single axis, left axis
Right = Index 0, number 1, single axis, right axis

Left Trigger = Index 0, number 3, single axis, right axis
Right Trigger = Index 0, number 3, single axis, left axis

Or use a new Blender version from http://graphicall.org/.

on single axis it dont say left or right… so im confused lol

Yes that is correct. You need a python script to separate the axis.