The Drop item ability removes one unit of an equipped Character Item and can leave its pickup prefab in the world. Use it for a player-controlled discard action or any other workflow that should drop the item currently held in one or more slots.
Before you begin
The character needs an Inventory, at least one equipped Character Item, and a Drop item ability. To leave a world object behind, the equipped Character Item also needs a Drop Prefab.
Use a prefab with Item Pickup when the player should be able to collect the dropped object again. Drop writes the main Item Definition and amount into that pickup and also includes any extra item amounts supplied by the Character Item’s actions, such as associated ammunition. A prefab without Item Pickup can still appear as a visual or physics object, but Drop cannot configure it as a collectible.
For an equipped item, the ability uses the Drop Prefab on that Character Item. The Inventory component’s default Drop Prefab is not a fallback for an equipped Character Item whose field is empty. Leaving the Character Item field empty therefore removes the inventory unit without spawning a world object.
Configure Drop
- Open Tools > Opsive > Ultimate Character Controller > Item Manager and create or select the Character Item that can be dropped.
- Assign its Drop Prefab, which is unassigned by default. Confirm the prefab has an Item Pickup component if it should restore inventory when collected.
- Select the character, expand Item Abilities on Ultimate Character Locomotion, select the plus button, and add Drop.
- Keep the standard input defaults for a player discard action: Start Type is Button Down, Stop Type is Manual, and Input Names contains Drop. The ability stops itself after the item has been processed.
- Keep the default Slot ID -1 to inspect every equipped slot, or enter one slot ID to drop only the active item in that slot.
- No Drop Item Definitions is empty by default. Add protected definitions when needed. A slot-specific Drop cannot start for an excluded definition. In the released Version 3 implementation, do not rely on this list to protect one item during an all-slot drop; use separate slot-specific Drop rows when exclusions must be enforced.
- Leave Wait For Unequip disabled for an immediate discard. Enable it only when the item’s Equip Unequip ability and Item Set group should return to the group’s default Item Set before removal. In released Version 3, use this option with Slot ID -1 or slot 0; use the direct Drop Event path for a single nonzero slot.
- Configure Drop Event. Its starting values have Wait For Animation Event disabled and Duration set to 0. Increase the duration for a timed release, or enable Wait For Animation Event when an animation clip should call OnAnimatorDropItem at the exact release frame.
Drop has no Item Category or Action ID selector. It always evaluates the active Character Item in the selected slot or slots. The ability allows duplicate types, so separate Drop rows can use different inputs, slots, exclusion lists, or timing when the character needs more than one discard action.
Choose the drop behavior
Drop one slot or every equipped slot
Use a specific Slot ID when an input should discard one hand, weapon slot, or other fixed equipment location. The ability can start only while that slot contains an active Character Item that is not excluded.
Use -1 when the same input should discard every equipped item. Drop removes one inventory unit for each active slot; it does not remove the entire stack. Empty slots are ignored. See the released-Version-3 limitation below before combining all-slot mode with No Drop Item Definitions.
Remove immediately or unequip first
With Wait For Unequip disabled, the Drop Event controls when the item is removed. A zero-duration event makes the discard effectively immediate. A short duration or OnAnimatorDropItem event can synchronize removal with a release animation.
With Wait For Unequip enabled, Drop asks every matching Equip Unequip ability to equip its Item Set group’s default set. Each item is removed when its unequip-complete notification arrives, and Drop stops after all selected items have completed.
The Drop Event wait also begins when the ability starts. Do not leave it on an earlier zero-duration callback when the item must finish unequipping first, because that callback can process and stop Drop before the unequip-complete path. Coordinate the event with the unequip animation, and verify that the character has an Item Set Manager, a matching Equip Unequip ability, and a valid default Item Set.
Spawn a pickup or only remove inventory
When the Character Item has a Drop Prefab, Drop spawns it at the currently visible item object’s position and rotation before changing the inventory count. An Item Pickup component receives the main unit being removed, limited to the amount currently in inventory, plus the additional item identifiers returned by the Character Item’s actions.
If the prefab has a Trajectory Object, Drop initializes it with the character’s current locomotion velocity and torque. Drop does not add a forward throwing impulse. Use the prefab’s physics and Trajectory Object configuration for the desired fall or movement; use a throwable Item Action rather than Drop for an aimed projectile throw.
The Character Item’s Full Inventory Drop option is disabled by default and is intended for throwable-item workflows. The Drop ability itself requests exactly one unit and does not use that setting to empty the stack.
How it runs
- The input attempts to start Drop. The ability caches the active Character Item in the selected slot, or the active items across all slots when Slot ID is -1.
- A slot-specific Drop refuses to start for an empty or excluded item. An all-slot Drop requires at least one active item that is not excluded before it can start.
- Starting Drop stops an active Use or Reload item ability. While Drop remains active, it also prevents either ability from starting.
- The ability supplies Item State Index 6 and begins its Drop Event wait. When Wait For Unequip is enabled, it also requests the appropriate default Item Sets.
- At the Drop Event or accepted unequip-complete point, the Inventory first attempts to create the Character Item’s Drop Prefab. It then removes one unit and removes or unequips the corresponding Character Item from the slot.
- Drop stops after the direct Drop Event has processed every cached item, or after every selected item has reported unequip completion.
Drop’s direct Use and Reload rules do not depend on list order. List order still controls which active item ability supplies Animator values for a slot. If Drop waits for a release clip while a persistent ability such as Aim remains active, place Drop above that ability when Item State Index 6 should win during the discard.
Verify in Play Mode
- Equip an item that has a Drop Prefab and keep the character’s Inventory and Ultimate Character Locomotion components visible.
- Press the Drop input. Confirm Drop (Active) appears, any active Use or Reload ability stops, and the selected slot loses one unit.
- Confirm the world object appears at the Character Item’s visible-object transform when the drop is processed. Walk into it and verify its Item Pickup restores the configured item amount.
- Equip items in two slots, set Slot ID to -1, and press Drop. Confirm one unit is removed from each active slot.
- To protect an item definition, configure a Drop row for that specific slot, add the definition to No Drop Item Definitions, and press its input. Confirm the ability does not start for that item.
- If using a timed or animation-event release, confirm the world object appears on the intended frame and Drop stops immediately afterward.
- If using Wait For Unequip, confirm the item finishes its unequip animation, the default Item Set becomes active, and only then is the pickup created and the inventory amount removed.
Troubleshoot Drop
- Pressing Drop does nothing: check that the input name is mapped, Start Type is Button Down, the selected Slot ID contains an active Character Item, and its definition is not in No Drop Item Definitions.
- The item disappears but no object appears: assign Drop Prefab on the Character Item itself. The Inventory’s default prefab does not replace a missing prefab for an equipped Character Item.
- The object appears but cannot be collected: check that the prefab has Item Pickup and its required trigger collider and layer setup. Rebuild or update the pickup rather than using only the held visual prefab.
- The dropped object does not move away from the character: Drop does not apply a throwing impulse. Check the prefab’s Rigidbody or Trajectory Object setup, or use a throwable Item Action for a directed throw.
- An excluded item is still removed by an all-slot Drop: this is a released-Version-3 limitation. The start check recognizes the excluded definition, but the later all-slot processing retains that active Character Item when another slot is eligible. Use separate slot-specific Drop rows and apply No Drop Item Definitions to each row that must protect an item.
- Wait For Unequip still drops immediately: check Drop Event. A zero-duration callback can run before the unequip completes; coordinate the event timing, then confirm an Item Set Manager and matching Equip Unequip ability can select a valid default set.
- Wait For Unequip fails for a specific nonzero slot: this is a released-Version-3 limitation in the unequip-complete lookup. Use Slot ID -1 or slot 0 for that path, or disable Wait For Unequip and synchronize the direct Drop Event instead.
- Drop remains active: when Wait For Animation Event is enabled, add OnAnimatorDropItem to the release clip. For Wait For Unequip, confirm the item reaches its unequip-complete event.
- The drop animation is hidden by Aim or another persistent pose: move Drop above the ability that should yield so Item State Index 6 has Animator priority while Drop is active.
- Using or reloading stops when Drop begins: this is the built-in concurrency rule. Finish the action before dropping, or customize the ability interaction when a different design is required.
Related tasks
- Item Abilities explains list order, inputs, and shared item-ability behavior.
- Character Item describes Drop Prefab, item identity, and the held item object.
- Item Pickup covers the collectible component expected on a reusable drop prefab.
- Item Creation explains how to build or update Character Items with the Item Manager.
- Equip Unequip controls the default Item Set transition used by Wait For Unequip.
- Default Animator Values lists Drop as Item State Index 6.
- Use and Reload describe the two item abilities that Drop stops and blocks.
Developer reference
Drop exposes SlotID, NoDropItemDefinitions, WaitForUnequip, and DropEvent. Its read-only DroppedItems collection contains the spawned objects recorded by the direct Drop Event path. The unequip-complete path removes and drops its items without adding those returned objects to that collection.
The built-in Event System coordinates the lifecycle:
- OnAnimatorDropItem completes a Drop Event configured to wait for an animation event.
- OnAbilityUnequipItemComplete
(CharacterItem, int slotID)lets Wait For Unequip process an item after its unequip finishes. - OnInventoryDropItem is sent for the spawned object and also has a Character Item form
(CharacterItem, int amount, GameObject droppedObject)for item-specific listeners. - OnCharacterItemAbilityActive
(ItemAbility, bool)reports Drop starting and stopping like other item abilities.
The Character Item’s Drop Item UnityEvent is also invoked whenever its drop operation runs, including when no Drop Prefab was assigned.