Forum rules - please read before posting.

Hotspot on Player not detected when using inventory item

Hi! I'm making a 2D game and I'm trying to interact with my Player using an inventory item, but nothing happens when I try to use it on the Player's Hotspot.

I have a cursor UI that changes when an inventory item is selected and hovers over a Hotspot, but I noticed it doesn't change when I hover over my Player with an inventory item. — so I assume the Hotspot attached to my Player's child GameObject isn't being detected.

My setup looks like this:
https://imgur.com/a/aESYphW
Is there something I'm missing in this setup? Thank you so much for your help!

Unity 6
Adventure Creator v1.83.0

Comments

  • Is the Player Hotspot normally selectable when no Item is selected?

    Share the Player's root Inspector as well.

  • Thanks for your reply! Here’s my Player prefab’s root:
    https://imgur.com/a/gVtG9oL
    I also wanted to mention that after I added the Remember Hotspot component, it started working. Before that, even the regular Use interaction didn’t work — the cursor wouldn’t change at all.

  • A GameObject must be on the Default layer for it to be detectable by Hotspot raycasts. Yours is set to Ignore Raycast, which Remember Hotspot will switch for you.

    Move the Hotspot to a child object, and then use Object: Send message Actions to pass it the Turn On message when an item is selected, and Turn Off when deselected. You can do this with the Inventory / Select and Inventory / Deselect events in the Events Editor.

  • edited April 7

    Thank you so much for the info! That’s exactly the flow I needed.
    I also had no idea I could use Object: Send Message with Hotspots—that’s going to be super useful in so many situations. Thanks again!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.