操纵杆驱动程序的问题 [英] problem with joystick drivers

查看:93
本文介绍了操纵杆驱动程序的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我使用这个驱动程序:



使用C#与操纵杆连接 [ ^ ]



我的问题是我无法从我的ps2操纵杆上获得正确的模拟读数,我只能读取Z旋转。我的问题是如何读取Z轴? Z旋转用于向左和向右移动,Z轴用于上下移动。

so i use this drivers:

Interfacing with a Joystick using C#[^]

my problem is that i cant get readings from right analog on my ps2 joystick, i can read only Z rotation. my question is how to read Z axis? Z rotation is used to move left and right, and Z axis should be for moving up and down.

推荐答案

解决方案非常简单。我只改变了这个:





int axisA = state.Rz;

int axisB = state.Rx ;

int axisC = state.X;

int axisD = state.Y;



到此:



int axisA = state.Rz;

int axisB = state.Z;

int axisC = state .X;

int axisD = state.Y;
solution is very simple. i only change this:


int axisA = state.Rz;
int axisB = state.Rx;
int axisC = state.X;
int axisD = state.Y;

to this:

int axisA = state.Rz;
int axisB = state.Z;
int axisC = state.X;
int axisD = state.Y;


这篇关于操纵杆驱动程序的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆