I have created a code that, when I place mousecursor on a mesh displays a text in a widget : when I roll over a statue il displays the text associated to that item to explain the art behind the statue, however I noticed that even when I am very far from the statue, when the mouse rolls on it, it displays the text : I want the text to be displayed only when the player is very near from the mesh, could you please help me with that ?
You should set HolderActor to the actor that this widget is associated with (ie the statue). Distance to show is the maximum distance away that you can still see the text. You probably want something like 300 or so- plus or minus a few hundred.
I see… I will test it tonight, thank you very much, and if it works I will close the topic.
However, if I want to associate not the mousecursor but the mouseclick, I mean if I want to be able to click only from a distance, do I have to replace “GetActorLocation” by “GetMousePosition” and associate its target to the playercontroler ?