How to prevent triggering behavior if the hit actor is off screen?


No camera in the top down spawned.

It must be one of your assets doing it.
Though the was recently rendered flag doesn’t change. Perhaps the calculations are based on the dot product of the actor and camera rotation. The camera is always pointing down so it may not be triggering the behavior.

I’m on 5.0.3. Maybe it was fixed in 5.1.0. I don’t see it in any of my 5.1.0 projects (same plugins installed and enabled), but do on 5.0.3. I don’t see how it really matters though. Deleting the camera doesn’t solve the issue.

Believe I finally found it. On the DirectionalLight setting “Dynamic Shadow Distance StationaryLight” to 3000 instead of 0 solves it.

So it definitely seams to be some sort of issue dealing with dynamic shadows. The setting isn’t quite right yet to show my shadows yet keep the culling properly so need to do more adjustments, but it’s absolutely a shadows problem.

Changing those settings or even outright disabling shadows doesn’t change it.

It does for me. Turning dynamic shadows off entirely is the only sure fire way in my case to get “WasActorRenderedRecently” to behave as one would expect.

Ok was a debug message link. Works with or without shadows.

Will work on migrating my project to 5.1 this weekend and see if that can help solve some things.

Make sure you do a backup, 5.1 has some weird behavior in places & some outright bugs (for instance root motion in multiplayer is bugged on rotated surfaces).

Yup, that’s a given. Luckily I don’t use any of the currently bugged features, lol.

Migrating from 5.0 to 5.1 fixed the double camera issue. Didn’t fix the “WasActorRenderedRecently” issue. Still some sort of problem pertaining to dynamic shadows.

Could never really get “WasActorRenderedRecently” working right. Created a BP function that checks the position of an actor against the viewport and sees if it’s outside the viewport. Seams to work perfectly and doesn’t care about shows or any other render behavior.

Unsure the performance implications of doing this though, but I assume it’s fine as these are pretty standard core functions used by widgets.

Only downside to this is it’s just checking origin position. Won’t be ideal for really big actors, but it’s not a problem for me and it’s only driving trivial non-gameplay critical things like floating damage numbers. It will eventually drive controlling tick rate, but for that I’ll expand it to check the bounds of an actor against viewport.

Below is my final result. Had to change >= 0 to > 0 for when something is so far off screen it can’t calculate at all.

Seams to work fine for my needs.