I am pretty new to UE4 and I hope you can help me.
I followed some tutorials on YT for adding nameplates to a character and this works. However, the name is displayed all the time no matter how far I am away from the character:
I added a sphere to the character
I turn on/off the widget for the nameplate by"on Component Begin Overlap" and “On component End Overlap”
So if player 1 (server) runs towards the enemy, the name tag or nameplate is displayed only for him. If player 2 runs towards the enemy, the name tag or nameplate is displayed for both - player 1 and player 2.
I want to display the attached widget (of the character blueprint) only locally for the player who started/ended the overlap.
Hi man,
you have to store the widget and the player , i would use a structure or just 2 arrays , here something
lets say you have N characters,
When a player character, reach another character, from the begin overlap, get the actor
save the actor in a clear slot of the array, and in another array save the widget created, using the same slot ,
so for the first char entering the area, Actor [0] =Bob Widget [0] Bob widget …
so for the first char entering the area, Actor [4] =Jane Widget [4] Jane widget …
When an actor leave the area around the char,
Search loop for the array for find the same actor , get the index , and remove only the widget[index]