Mouse not moving when shooting

In my game there’s a different variety of guns, one of the types of weapons is automatic guns, I wanted to make so that you could be able to move the mouse while in full-auto (while shooting), but 2 things happen
1 - the mouse disappears whenever i click/hold the mouse button
2 - Due to the fact that the mouse disappears, It’s fisically impossible to move the mouse’s position, beign “fixed” in a single point.

I have a theory that it MIGHT be due to the amount of input modes I used in the blueprints, but using them was the only way I managed to make the menus of the game work properly.

Anyone has an idea on what is causing this?


Open Pause Menu BP


Menu WBP


Change Weapons/Weapon Select BP


“Back” function (on both Weapon Select and Options’ BP)


UI elements (since it’s like a “zapper” style game, I need the mouse showing all times)

Hey @LuhBonettoRD!

So I like where your head is at, but this probably doesn’t have anything to do with the menus. These aren’t inputs, they’re buttons- where’s the “Click to shoot” code?

That should be what we need! Let us know! :slight_smile:

1 Like

For full auto make it a Click to start and a click to stop.

1 Like

Oh yea, totally forgot to put the BP on the forum

There you go!

Okay! From what I’m seeing here there isn’t a reason it should do that.
However, this being a custom event, we know it came from somewhere else. What about where “FireWeapon” comes from?

Also, I don’t know that this would be it, but you can try setting input mode to “Game and UI only” or “Game Only”, I know there are some little things that change between those two settings.

Edit: Another thing, depending on your inputs and what you adapted it from, it may still be trying to do a camera movement but refusing input, let’s see your mouse X/Y to move camera events as well!

1 Like

The “Fire Weapon” is basically a Left Mouse Input that passes through the “configurations” of each firing mode, that’s determined by each weapon on Pic 3

Camera wise, I don’t really know how to get the info you want (UE beginner), but the camera is basically a “panorama” style that moves to the direction that the mouse is, it’s an situational thing because I want to have some levels with a fixed camera position, either way, the bp and a example are bellow. It still “locks” my mouse but keeps the camera movement

Also tried to switch basically every “Input Mode” to different ones but no changes for the better, at least to the extent I’ve tried

I think I may have noticed something, finally!

Here and here:

image
You are using “Left Mouse Button” input in two places. Try to eliminate that by adding the reload code TO the one that goes to “Switch on E_Firing_Mode” so if you try to click:
First it checks to reload.
THEN it shoots if reloading doesn’t need to happen.

It’s possible that the multiple inputs being sought was consuming the mouse or something along those lines. :slight_smile:

Yeah that’s it, also added a Input mode in the firing BP, that managed to fix it but it was kinda janky.

Thanks a lot!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.