Howdy! This is my first attempt at a 2D game, so I might just be doing something wrong. Any idea why my character disappears when I interact with a prefab fit with an Item Collector?

My project followed the 2D grid battle tutorial first. Other interactions (like dialogue) work fine, but if I interact with a prefab (fitted with Rigidbody 2D and Box Collider 2D with "is Trigger" checked) the main character's sprite disappears. It doesn't change layers or transforms or anything -- if I check and uncheck the sprite renderer, it does not reappear. I can still move around and interact with things though. The item does not disappear and nothing is added to the player's inventory.

One thing does pop up on the Box Collider 2D: A warning that says "The collider did not create any collision shapes as they all failed verification. This could be because they were deemed too small or the vertices were too close. Vertices can also become close under certain rotations or very small scaling."
  • Check the item collector's Start Settings > Object Turn Settings. 2D games shouldn't use any of the turn options here, or your 2D sprite will be rotated and potentially not visible due to that.

    Unless you're using a setup where the root of the player rotates into any direction and a child object displays the sprite. With such a setup, you can use the Face Camera component to always have the sprite be rotated toward the camera.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you! The object turn settings were making the player disappear, and that's been fixed. However, it's still not collecting the item.

    If I remove the item collector and use an interaction machine instead, that works just fine. There is an ORK Game Starter with "Start Game" enabled in my scene. So I imagine it's something I'm doing wrong with the collector settings, but I can't figure out what. Any ideas?
  • If object turn happened, that means that the interaction actually happened (or the player wouldn't turn to it). Did you set up the item collection dialogue in Inventory > Inventory Settings?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • That was it! Thought that was set up but there was no UI box assigned and I guess that was the issue. Thank you!
Sign In or Register to comment.