Hotspot improvements/bug

Using the hotspot component I could discover (beside that they are very useful) some space for improvements:

  1. the setting for the viewing angle is useful, but the hotspot (circle) is still visible, which can be irritating for the user, especially if we have a open space or transparent objects in the scene. Like in mine, where is a window (Minimal) and if you look inside the room you shouldn’t be seduced to click on the circle outside the window. Because when you do so, nothing would happened (see problem 2)

My solution would be: use same tweening value as for the alpha fade from the title for the scale of the circle, than the visibility is really depending on the viewing angel (at least optional, like “hideHotspotIfNotInFoucs”)

  1. if the option 1 is still optional the current situation has another bug. If you click on a hotspot, which is at this point not “visible”, it still opens the content… but not visible. To test: click the circle in front of the window, while in the room, than rotate the camera and the hotspot is already open.

  2. To improve the hotspot even further I could imagine not only a angle dependent visibility, but also dependent from the distance. For example (again in the room): while orbiting the room you just should see the chair and from outside the window. But if you change the view to the table or just zoom in, the distance between the table and the camera gets much smaller and there could be 3 hotspot laying on the table with a max distance setting of 2 whose than start to popup.

This would be very helpful for all kinds of infos in showrooms etc. and shouldn’t be much work.

Original Post on Discord

by user 539536674582036491

Hey :wave:
It’s a sample so that it’s easy for people can adjust it to their needs, thanks for the comments!

Did you end up modifying the hotspots script(s) to include these changes? We can review that and either put it up as community contribution or adjust the sample.

Not yet, but it seem as I should. But I’m still a typescript snail… maybe a good starting point but I’ll have to see, if I find some time.

by user 539536674582036491

I leave this open if I have questions while creating if it’s ok.

by user 539536674582036491

With a bit (or better say full) copy paste and trial and error (I learned that scale may not be zero for example) I finally got it working. I mark this as answered and if I test and refine it a bit more I can post it also. You can see a working example here: Minimal

by user 539536674582036491

Pretty nice, thanks for sharing! I’m happy you and team have found Needle :slightly_smiling_face: