Incremental threshold control

What would be the best way to “map”
the threshold levels for a game controller?

i.e: i’m using a Logitech USB Rumblepad 2
(4-axis / 12 button) and have to set the
threshold extremely high to create a deadzone
(30,000 currently)

this makes it a bit hard to get my character to
creep along instead of committing suicide with
the nearest vertical object :eek:

Maybe you haven’t well calibrated your joystick.
But I think it is better to use a Python script. Then it is possible to use analog values to control your character. Here is the original Blender 2.49 script from http://www.blendenzo.com/indexTuts.html and my changed script for Blender 2.53.

HG1

Attachments

analogJoystick.blend (255 KB)analogJoystick2_53.blend (384 KB)

Thanks much.
Turns out it was really just a threshold value thing.
And it just happens you’re the one I’m looking for :slight_smile:
Using your movement.py as a reference for learning more python.
Got a good handle on it, but having probs… no matter how I
set up, I can’t get linV or angV to work properly. I can get them
to work on a single object, but not on an object that is parented
or has a child object(s). Especially annoying since the game i’m
working on obviously has an armature.

In the attached blend, just trying for a basic mario-style camera control.
The camera is attached to an empty, which is in turn attached to the cube.
The rotation (dRot… not angV) works unless i zoom in or out.
Then it goes all wonko. And I can’t figure out why the linV and angV
don’t work even though it’s dynamic.

Attachments

camtest.blend (86.2 KB)

Your script is working well. When you change the distance from the camera the parent distance did not change. So the camera begins to rotate around the emtpy. You can try to scale the empty so the camera should move.
I try to fix it maybe on the weekend.

HG1

I did not realize…
Gives me a place to start, at least. :slight_smile:

Hi. What I mean is when you parent the camera with the empty, the camera actuator did not work properly. What you can do is to change the distance with a normal motion actuator. Or scale the empty with a Python script.

If you want that the camera jup between two positions, you can parent two emty’s with the first empty and wirte a “getpostion, setposition” script to jump the camera on the position of the empty’s.

I never played mario so I don’t know how the camera works. I think I must watch some Youtube videos. :slight_smile:
But i think that the camera actuator should do it if you parent the camera and setup the right values on the Canera actuator (look the tutorial).

About the linV and angV probelm. You have parent the empty to the cube, so the linV and angV works only on the cube. You must parent the cube to the emty if you want that the physic works on the empty.

Maybe you know them. But here some tutorials.
http://www.blendercookie.com/category/all/tutorials/game-engine/
http://www.tutorialsforblender3d.com/

HG1

Attachments

camtest.blend (85.7 KB)Par_linV.blend (434 KB)