"Was recently rendered" in multiplayer

Hello,
is there a way how to use “Was Recently Rendered” note to get info about if actor is not being rendered by every client?
For example I have Cube that is moving to random locations connected to event tick.
If Client 1 can see him and Client 2 cannot I want Cube to be still moving but After Client 1 and Client 2 cannot see cube I want to turn event tick off to improve performance.
I do not want to use sphere collision to detect if there are any players around because of the perfomance. (Collision is reducing performance a lot)
I am using “Was Recently Rendered” note pluged into the timer that is executed in beginplay delta = 1 second

1 Like

From what I understand about “Recently Rendered” is that it refers to objects in view – objects are rendered when in view.

What if both players turn away from the cube, and so the cube is not “RR”? Not sure the exact nature of your use case, but the cube could inadvertently get removed.

Is it always the case that the cube is removed when out of sight?

How many clients? Maybe use the players’ forward vector. Or a cone-of-vision…

Hello and thanks for your feedback.

We are working on a huge world with AI so we might have 20 players max (We are still consultating about it)

Our problem is performance in blueprints.
I need something that cheks if player is around in some distance.

I can use spere trace by channel but the performance cost is huge, so i have to find a better alternative.
I need to turn off every useless codes that nobody can see.

Something like if you use AI to generate navigation. You want AI to generate navigation in the moment when some player is around. You do not need AI to generate navigation when you are on the other side of the map. The best way to improve performance is to destroy AI or completely turn it off
(navigation invoker,event tick,timers)

But there is my problem thatbI do not know how to check if is some player around with low cost performance.
“Was Recently Rendered” note works in the moment when actor is not rendered that means that I can look away from it it and actor gets unrendered.i only need if you are far away from actor and nobody is around.

1 Like

Divide the map into sectors. If a player and AI are in the same area, the AI triggers.

I do not think dividing map is the good way to do that. If I would be in sector 1 and AI in sector 2 and distance between us would be 20 meters or less it would be visible that is something wrong.
I need almost perfect AI render in distance.

1 Like