I created a new first-person project. At first it worked, but then something went wrong. Input works on the character, but not on the weapon component. Add mapping context is called, but IA_Shoot call does not happen

I created a new first-person project. At first it worked, but then something went wrong. Input works on the character, but not on the weapon component. Add mapping context is called, but IA_Shoot call does not happen
Hi @Screll3
If you have it assigned on more than one component is it possible the first instance is consuming the input?
Make sure its not on the actor and the weapon. You only need it on one of them
I MAY be totally wrong in my logic tho
But this code was in the first person template.
un modified? have you moved or changed anything?
I don’t think I’ve touched anything that brakes inputs. Just changed the location of BP_Weapon_Component. It shouldn’t affect the inputs, should it?
That sounds like you are using the same input action for 2 things? Which is why i asked
Only the character needs to know about shooting the weapon, it then either processes the firing itself or fires an event (pun intended) to the weapon to tell IT to fire a projectile
So without seeing what the input action it attached to i cannot say why it wont fire
Also is the player controller getting assigned the input mapping? have you attached a print node to the fail pin on the cast to make sure?
The mapping may be getting triggered but the player controller may not have it assigned if that cast failed. I assign the input mapping INSIDE my player controller so it targets SELF
I created a new first person project and everything works there, although the code is the same
There is something amiss somewhere its easy to accidently break or change something when new, at least the new project works for you!
I’ve been having a similar issue. I clone a working input mapping context, without making any changes, and use the new clone instead of the old (working) context. But now suddenly none of the events are received anymore. Even though the two contexts are identical, consisting of the same actions and mappings etc.
This issue doesn’t affect keyboard input seems like, but it’s affecting my Oculus Touch controller. Whether this issues affects other controllers or gamepads, I cannot say.
Hi @useronym
Whe you cloned your mapping contexts and actions , did you set the mapping in your player bp or your player controller to use them?
Sure did!
As mentioned keyboard actions in the new input mapping context work well enough, but anything from my Quest Touch controllers gets ignored.
Hi there @Screll3, hope you’re well!
This topic has been moved from International to Programming & Scripting: Blueprint.
When posting, please review the categories to ensure your topic is posted in the most relevant space.
Thanks and happy developing!
I finally figured this out. When using the OpenXR plugin, you have to create a input mapping actions config that lists all the contexts that will then be available for use. Assign this config in OpenXR plugin settings.
There really should be a warning printed when trying to use a mapping context which is not included in the mapping context settings.
Thank you! How did you eventually track that down?
Struggled with this for a day. I created a new IMC, IA, and even a new project. I could not get this to work at all. @useronym has the right answer almost. Even after adding a custom IMC to this VRTemplate, I was not able to get it to function correctly.
If you are still having issues, after adding this IMC to the template, delete any custom Input Actions and readd them. I’m able to get it working somewhat. I even restarted the engine because this is 100% buggy. It even says it in VRPawn:
Be careful with using Input Mappings maybe until next update. This will definitely pull your hair out a bit.
To add on top of that, when you create IMC’s and move them to different folders or rename them, UE5 just spits out errors. This is very hard to trust and could lead to a nightmare finding a bug.
One more thing: make sure you have unique config names if you’re switching between multiple ones. Some of these “names” or “comments” are actually unique identifiers for OpenXR.