When the collider attached to the character is touching multiple gameobjects at once and the player triggers the pick up function, both objects are picked up in the same hand.
Version
Test Scene
To Reproduce
Steps to reproduce the behavior:
Go to Test Scene
Play Game
Move character until it is touching two objects at once
Press either Mouse0 or Mouse1
Expected behaviour
Only one object is picked up.
Desktop System:
Windows 10
Additional context
This is a problem with the pickup code. When the item is held in the hand, it toggles a boolean that prevents you from being able to pick up items if you are holding something already. When you aren't and you are touching two items, it doesn't know to prioritise one over the other.
Describe the bug
When the collider attached to the character is touching multiple gameobjects at once and the player triggers the pick up function, both objects are picked up in the same hand.
Version Test Scene
To Reproduce Steps to reproduce the behavior:
Expected behaviour Only one object is picked up.
Desktop System:
Additional context This is a problem with the pickup code. When the item is held in the hand, it toggles a boolean that prevents you from being able to pick up items if you are holding something already. When you aren't and you are touching two items, it doesn't know to prioritise one over the other.