Porkins97 / DinoNuggetsGame

0 stars 0 forks source link

Pickup Multiple Item Bug #1

Closed Porkins97 closed 5 years ago

Porkins97 commented 5 years ago

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:

  1. Go to Test Scene
  2. Play Game
  3. Move character until it is touching two objects at once
  4. Press either Mouse0 or Mouse1

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.