Hi, i want to create walkable area, but i want to show label under cursor (something like Hotspot on navmesh). Is there any way to do that. Something like when move cursor to walkable sidewalks it shows "Sidewalks with gums" or when move cursor to sand road it shows "Dusty road".
Thank you
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @roh032.
It's a bit tricky, but it is possible. Is this for a 2D or a 3D game, and are you using Point And Click movment?
The Hotspot label requires a Hotspot, so you'd have to place down a Hotspot that covers the same area as the NavMesh. To have it so that clicking it causes the character to move to it, you can use this simple script (MoveToHotspot.cs):
Attach this to the Hotspot, and then define a "Use" interaction for the Hotspot (but don't supply an Interaction ActionList). If it shows in the Hotspot's Inspector, check Single 'Use' Interaction?.
This script works by hooking into the OnHotspotInteract custom event, fired when the Hotspot is clicked on, and then moving the Player to the cursor's position. A tutorial on their usage can be found here.