Search Unity

R Button UFPS

Discussion in 'PSM' started by Black_Eagle, Jul 27, 2014.

  1. Black_Eagle

    Black_Eagle

    Joined:
    Jul 19, 2014
    Posts:
    36
    I tried everything but I cant seem to get the r button to attack in UFPS, I can get the r button to do everything else like zoom but I cant seem to get it to attack...can anyone help? I tried the axis r but I didn't know what pressing and default meant and didn't know how to set it up
     
  2. Urkaniandrift

    Urkaniandrift

    Joined:
    Jan 16, 2014
    Posts:
    1
    I have the same problem
     
  3. junaid109

    junaid109

    Joined:
    Mar 3, 2013
    Posts:
    13
    You need to add the key assignment for the PS Vita in the script of UFPS where attack function is used and change it to KeyCode.JoystickButton5

    eg
    if (Input.GetKey(KeyCode.Joystick1Button5)) {
    // 'R' is pressed.
    // Do Something
    }

    or like this you can then assign input using input manager
    eg
    if (Input.GetButton("Attack")) {
    // key assigned to 'Attck' action is pressed.
    // 'Attck' is assigned in the Input Manager as JoyStickButton 5 which is joystick button 5, 3rd axis
    }

    I use RealsiticFPS myself but hope this method helps: