Forum rules - please read before posting.

Hotspot Detector parameters?

Hi everyone!

I'm working on a game with controller/keyboard input and no mouse cursor. To make this as fluid as possible, I'm relying on hotspots that you can cycle and interact with via the Context Sensitive input functionality.

Obviously a lot of this relies on the hotspot detector on my player character. However, in some larger zoomed out scenes, I'm noticing that the player vicinity hotspot detector makes less logical sense. In fact, I'm noticing that the most logical behavior would be to be able to cycle all hotspots that are present on the screen at any given time (basically a hotspot detector that is exactly the size of the screen)--but I can't seem to find a combination of Settings that allows me to do this.

Has anyone run into this before, and is there some way to try this functionality out?

Comments

  • If it's a case of cycling through all Hotspot on-screen, you may be able to get by with just enlarging your detector to span the playable area.

    You can use a local Player in such scenes - or control its size through animation or script - to prevent it affecting other times.

  • edited January 2023

    I've experimented a bit with the larger hotspot detector, yeah! Unfortunately it doesn't really work at scale because of how often I'm pushing in and out of my scenes, which would require constantly adjusting the size of the detector.

    I was hoping there might be a way to scale the detector to just always be the size of the active camera, but that might require a bit more custom work and be a longer term goal for this particular project.

  • The size change of the detector should be linear as the camera's FOV changes - you should be able to take some values at two extremes (e.g. FOV = X, Detector size = Y) that can then be used to write a simple "y = mx + c" function that adapts the detector with camera size automatically.

    However, I do think that it would be useful to also have the ability to override a Hotspot Detector's internal list of present Hotspots through script. I'll look into this possibility as part of the next update.

  • Thanks for the consideration, Chris!

    I'll chat with some more experienced Unity devs that I know and see how easy it might be to implement the suggested behavior in the meantime.

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.