This component allows the character to interact with Weapon Pickups placed in the world.
HOW TO CREATE? #
When you’re editing your character’s blueprint, simply add a new component called Weapon Pickup Interactor. It’s located in the Weapon Designer category. You can also add it in-game using the Add Component node.
HOW TO CONFIGURE? #
- Set the interaction mode. The player can pick up the weapon by “walking” over it and/or by pressing a key while aiming at the weapon.
- If necessary, set the parameters for the line trace.
- Make sure your settings are consistent with those of your Weapon Pickup classes. For example, you set the interaction mode to “Overlap,” but your Weapon Pickups are not detectable when set to “Overlap.”
INPUT #
This class handles inputs for you and works with the Enhanced Input plugin. You must specify the Input Action that allows you to equip the right hand and/or the left hand. You don’t have to specify both; you only need to do so if your character can carry a different weapon in each hand.
CONSUME INPUT #
You can specify whether the input should be consumed or not. A consumed input will not propagate to your blueprint. If the input is not consumed, events will still be triggered, and the input will propagate to your blueprint or any other class that has registered a function for that specific input.
OVERLAP WITH ACTION #
If you choose “overlap” as the interaction type, the player will pick up any weapons they overlap with. You can enable this feature so that the player must press a key to pick up the weapon they overlap with.
EVENT #
- On Pickup Overlapped: Called when a pickup actor is overlapped
- On Pickup Action Triggered: Called when pickup action is triggered (overlap or action)
