Weapon Pickup is the base class used to represent a weapon in the game world. It prevents the Weapon class from being overloaded with player pickup logic. In a future update, it will help optimize memory usage by avoiding the need to load all components of the Weapon class (Mesh, Material, Texture, Sound, Animation, Actor Component, etc.) into memory. Weapon Pickup allows you to represent the weapon in different ways; for example, you can make the weapon float in the air or, conversely, use the physics engine to make it fall to the ground.
HOW TO CREATE? #
From the content browser, use the context menu (right-click) to select Weapon Pickup from the Pickup sub-category in Weapon Designer category.
HOW TO CONFIGURE? #
- Select the presentation type (Animated, physics-based, zero-gravity, or static).
- Decide whether the pickup can trigger an event when it overlaps with another object and/or when the player targets it.
- Decide whether the pickup is automatically destroyed if the player picks it up.
- Turn the weapon preview on or off.
- Adjust the radius of sphere collision.
HOW TO USE? #
- Place a pickup in a level.
- Select the weapon class on this instance.
- Your character’s blueprint must contain the Weapon Pickup Interactor component.
- Play!
TYPE #
Weapon Pickup offers four different presentation options:
- Animated: The weapon is animated using animation curves.
- Physics-Based: The weapon is controlled by physics. The weapon’s mesh must have collision enabled.
- No Gravity: The weapon is controlled by physics, but gravity is disabled. The weapon floats in the air.
- Fixed: The weapon is static.
DETECTION #
You can choose whether the pickup is detectable via overlap and/or via the pickup interactor’s line trace. This allows you to define how the pickup can be collected by the player (this also depends on the pickup interactor’s settings).
PREVIEW #
You can enable or disable the weapon preview. Specifically, the Weapon Pickup will iterate through the components of the weapon class and create a mesh that will serve as the preview. For now, this requires loading the weapon class into memory, but a future update will allow for a preview without loading it into memory, using a caching system.
AUTO DESTROY #
You can decide whether the pickup is automatically destroyed when the player interacts with it (picks up the weapon). If you disable this option, you will be responsible for handling its destruction.
