手柄及move键位

注意 手柄按键设置 
	○ 口 X △ L1 L2 左右摇杆按下 触摸板按下 为按键 使用input.getkey()进行调用
	左右摇杆 方向键 L2 R2 为轴偏移 使用Input.GetAxis()进行调用
	中间触摸板为单独API

手柄部分

  • 中部触摸板
    PS4Input.GetPadControllerInformation(playerId, out touchPixelDensity, out touchResolutionX, out touchResolutionY, out analogDeadZoneLeft, out analogDeadZoneRight, out connectionType);
          PS4Input.GetLastTouchData(playerId, out touchNum, out touch0x, out touch0y, out touch0id, out touch1x, out touch1y, out touch1id);
    

    按键部分

按键名称 对应键位 说明
三角 Joystick1Button3 joystick和button中间的数字为玩家ID 0号玩家为1累加
圆圈 Joystick1Button1 同上
方块 Joystick1Button2 同上
X Joystick1Button0 同上
L1 Joystick1Button4 同上
L3 Joystick1Button8 同上 左侧摇杆也是按键
R1 Joystick1Button5 同上
R3 Joystick1Button9 同上 右侧摇杆也是按键
OPTIONS Joystick1Button7 同上
TOUCHPAD Joystick1Button6 同上 中间触摸板是可以按下的

摇杆部分

inputmanager设定轴名称 且设定type为joystick Axis

摇杆名称 axis(摇杆轴) joyNum(对应玩家id)
左侧摇杆X轴 Xaxis joystick1
左侧摇杆Y轴 Yaxis joystick1
右侧摇杆X轴 4th axis joystick1
右侧摇杆Y轴 5th axis joystick1
L2 8th axis joystick1
R2 3rd axis joystick1
左侧方向按键左右 6th axis joystick1
左侧方向按键上下 7th axis joystick1
最近的文章

数学

三角公式直角三角形 Sin(a)角a的对边比斜边 Cos(a)角a的邻边比斜边 Tan(a)角a的对边比邻边 cot(a)角a的邻边比对边 任意三角形 第一余弦定理(任意三角形射影定理) 设△ABC的三边是a、b、c,它们所对的角分别是A、B、C,则有 a=b·cos C+c·cos B, b=c·cos A+a·cos C, c=a·cos B+b·cos A ##向量 加法–相加得出一个新的向量 ...…

阅读全文
更早的文章

ps4 VRManager

能上代码不BBusing UnityEngine;using UnityEngine.VR;using System.Collections;#if UNITY_PS4using UnityEngine.PS4.VR;using UnityEngine.PS4;#endifpublic class VRManager : MonoBehaviour{ public float renderScale = 1.4f; // 1.4 is Sony's recommended scale...…

阅读全文