i need to have something like in every game where you face for example a weapon and a text displays saying “press X to pick up”. I was wondering what the best way to do this is. Surely tracing every 0.1 seconds or some other small interval right in front of you would be quite costly for such a minor function right?
The Learn Tab at your Epic’s Launcher there is a complete project called “Blueprints” and there you have quite an example of a icon (cloud be anything elese) which reacts when you get close to it and also open a window with text.
I just recently had this issue and at first I was using a box collision coming from the camera out a certain distance. This worked fine, but not quite right.
I have now switched to doing it via a line trace. I have it on tick set to 0.1. Is works so much better and hasn’t effected performance at all. I thought it would be costly by doing it this way but I was wrong. Mind you, I have nothing else on Event Tick.
Just test it out yourself and see how you go. I tried having another 20 line traces on event tick just for fun and still had no performance drops. Seems to be very cheap to do.
Thank you both very much! I will definitely check out the “Blueprints” project and i can now rest easier knowing that my traces won’t kill the performance.