Rewired Virtual Buttons

Absent83

Member
maybe my problem is related to this topic.

I`ve setup touch control with rewired. Controllers of rotation, move, change weapon and zoom works properly.
Only the fire button works very strange. If i press button and unpress it without any mouse movement (in the editor play mode) nothing happens, but if I press it, hold and move finger away from button and even from "screen", wheapon shoots!

More over this works only if "stay active on swip out" is checked.

Here is settings.

UCC 2.0.7

1545307668525.png

1545307689175.png

1545307849205.png


And here is the video.
 
Last edited:
Test on android device shows, that attack button works absolutely properly.

What is the problem in the editor?
 
Last edited:
This sounds like it is a separate topic. You can debug this by checking the GetButtonInternal input within RewiredInput, though it sounds like it might be a configuration error with Rewired.
 
Thank you! I`ll check GetButtonInternal and post results.

Have you seen the video, where I show debug info in the inspector?
 
Here is a new video and corresponding Logs (in attached file).

I have added debug.log in RewiredInput - GetButtonInternal with condition (name == "Fire1") and in ShootableWeapon - HitscanFire




You can see that GetButtonInternal works properly when I press fire1 button.
 

Attachments

  • logs.txt
    41.1 KB · Views: 2
When the weapon returns true but it isn't firing, can you place a breakpoint and see what prevents it from firing? This should give an indication as to what the problem is.
 
It`s interesting for me!

Where should I place a breakpoint? Please point out class and method.
And what parameters should I observe?
 
This is probably something related to the ShootableWeapon so you can place a breakpoint within ShootableWeapon.UseItemUpdate. If this method doesn't get called then you'll have to start with Use.CanStartAbility.
 
Problem is in the Use.CanStartAbility and method.

I want to repeat that controllers of rotation, move, change weapon and zoom works properly.
Only the fire button works very strange.

Is it a problem of UCC or Rewired ?

1545829929095.png


1545829884697.png

1545829626543.png
 

Attachments

  • 1545829705173.png
    1545829705173.png
    36.5 KB · Views: 7
  • 1545829735657.png
    1545829735657.png
    33.7 KB · Views: 7
Last edited:
Ahh, ok, I see what it is. The Rewired integration doesn't override IsPointerOverUI because I didn't think that it had virtual controls. I'll see if there is a better way to handle this but for now within RewiredInput add the following:

Code:
public override bool IsPointerOverUI()

{

   return false;

}
 
Thank you!

Now fireButton is ok!

But now I have to uncheck "Disable cursor" because if I check "Disable cursor" and enable cursor in play mode with escape and then "touch" a button with mouse cursor (and left button), mouse cursor disables again.

1545908268950.png

It will be better, if I shouldn`t to uncheck "Disable cursor" and use only "Enable Cursor with Escape" and mouse cursor doesn`t disable when touching UI.
 
Last edited:
I have come across this same issue where all the other buttons/actions are working besides Fire1 with Rewired touch controls. Is there a solution to this?
 
I figured out what my problem was. I didn't need to make the script change. I didn't have "Enable Touch Controls" option checked in the Rewired Input component on my player.
 
Top