Hello, I would like to make a system which highlights (post-process outline) holdable objects.
The only problem is blueprint interface react fewer times than it’s called. Print String “control one” is showing two times more than Print String “control two”, I hope you can understand me. I attached screenshots below. And by the way if you can suggest a better solution than comparing variables to do that feel free to share your idea with me
this might not be a proper solution to the problem, but from what I see and understood, it might be an issue with “Event Tick”.
I personally try to avoid using it and instead use a timer. Check every 0.1 secounds if the character is facing an object that he can pickup. With a proper outline fading in and out setup, the little delay is not perceivable. I am using this setup and never felt that my interfaces get called irregularly.
A thought on the problem itself: What is the target of the interface call? (first screenshot). If this value is a variable and not a constant, the issue might be there. But just because an interface is way faster than casting, it could be the case that your events stack (if really run on tick).
I changed my blueprint, now Tick_03 has been changed to timer every 0.1s. It will allow me to optimize the game, so I am very grateful to you for that, however my problem still persists. I also tried to use a timer instead of my object detection tick, but no effects.
I tried to replicate the issue but couldn’t get a hold of it. In standalone, as dedicated server and as client, my interfaces are always shooting right away…
I run a line trace in my character looking for an object in the level that has my testing interface implemented. If this is hit, a string is logged BEFORE and AFTER calling the interface function. The actor itself that implements the interface does log a separate string as well. I have no delay, lag or stack when playing standalone, as dedicated server or client…
I am using a “nearly-fresh” UE4.27 testing game. So it might be the context of your feature that causes the problems and not the interface functionality itself…