Hello everyone
It seems I have notched something which I'm not sure if it is a bug or not. When the player stand in front of a hotspot and the hotspot icon appears, the player would be block the icon I believe the icon should be visible on top of anything. I also have as second manner, is there a possible way that we can have an additional icons that within a specific radius these icons
should appear to locate near by hotspot objects.
Please check the uploaded videos for more details
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Do you have Hide icons behind Colliders? unchecked in your Settings Manager? That should prevent the the presence of any colliders getting in the way of an icon's display.
What are your AC/Unity versions, and can you share your Settings Manager?
If you switch to "Player Vicinity" Hotspot detection (see this tutorial), all Hotspots within the detector will display their icon.
For an icon to display, however, it must also be interactive. If you want icons to display even when not interactive (i.e. because the Player is too far away), you would need to rely on custom scripting to render them instead.
Yes I have Hide icons behind Colliders unchecked. Still the player standing in front of the icon would hide it.
-I have Unity version 2020.1.6
-Latest AC version.
-Here is screen shots of my setting manager:
https://imgur.com/ZD1YsRV
https://imgur.com/z9dxLbm
https://imgur.com/LbNA6ow
https://imgur.com/ffIhRry
https://imgur.com/ujWbis9
I'm not really too familiar with custom scripting.. Isn't there other easier way?
For example: display hotspot icon should be -when close by a hotspot- show "inspect icon" and when -touching the hotspot- show "Use icon". This should be very useful to AC as well because sometimes the players wouldn't know if there are any interactions around unless they touch the hotspot..
You're rendering the icon in World Space, so it'll be bound by your MainCamera's "Near Clip Plane" field.
Pause the game when this occurs, and look for the object with the name "Hotspot - icon" (replacing Hotspot with the name of your Hotspot). Check its position - is it too close to the camera? Does this occur if you use Screen Space instead?
I can assist, but I'll need more clarity on what you're after - what do you mean by "touching the hotspot"? As in, close enough to interact - with the "inspect icon" only showing when nearby but too far to interact with?
This script, attached to a Hotspot, allows an icon to show independently of the built-in icon system:
I changed it to -screen space- and it worked. Nothing blocks the icon now, thanks.
Well, by that I mean when the hotspot detector touches the hotspot itself, then the Inspect icon would disappear and the "use icon" would show instead. Kindly check the first video I sent. When the player comes close to a hotspot, the "Inspect Icon" would appear on nearby hotspots, then, when the player's hotspot detector comes in contact with the hotspot, the" use icon" should appear.
Kindly check the first 10 seconds only.
When nearby the "inspect icon" appeared. (to tell the player that there is something to interact with here) then when the player actually came in contact with the hotspot the "use icon" appeared.
The script above will allow for the "inspect icon", behaviour in the video, leaving AC's built-in Hotspot icons for the "use icon" behaviour.
Beautiful script. Works great.
Just two minor issues:
The first one, I can't seem to be able to change the size of the icon. It looks big.
The second issue, when the player gets in contact with the hotspot the "Inspect Icon" does not disappear, its still there and blocking the "Use Icon"
Oh also another issue is, the "Inspect Icon" would still appear even if the hotspot is turned off
I tried it, the Icon does not appear anymore..
Try it now. Note the change from icon texture to sprite in the Inspector.
The script works perfectly, but the only issue is that the player could hide or block the icon when he's in front of it.
With this technique - as with World Space - the icon is rendered using a Sprite Renderer as a 3D object in the scene. Define a new Layer and assign it as the "Icon Sorting Layer" to render it above other objects.
I created a new layer and assigned it as the "Icon sorting layer" however, the player still blocks the inspect icon
That may be down to your Materials / Render Pipeline, in that case.
You could try assigning a new Material to the SpriteRenderer it generates, or try this alternative that goes back to the original method but scales the texture:
Works like a charm! Thank you for your consistent support. I'll experiment with it more and let you know if anything else comes up