Question about the IsVisible (render) node?

Does this only apply to what is visible in the camera view or over the whole map? If I have 5 enemies total in the map, but only come up to 1 or two at a time in a linear path. Will this node return false if there are none in the camera view? Or none on the level currently?


I think it’s applied to the whole map. Even if you can’t see the enemy in the camera, if it’s not visible, it will return false. Else, if there are 5 enemy in the map, all of them is visible, but only 2 you see in the camera yet, if you check the IsVisible for the other 3, it will return true because it’s not hidden in the game.

1 Like

is visible is a boolean property of the Mesh Component which tells the rendering System if the Mesh should be considered for rendering (you can toggle this value if you want something to pop into and out of rendering)
if you want to check if something is “on screen” you can check WasRecentlyRendered (you might need to do a little bit of extra work figuring out how much time is enough for the effect you want)
keep in mind that Actors set with isVisible to false are high candidates for the Engines Sleep functionality. meaning that you might need to re-engage the Tick() or activate their collision/physics response if they have been put to Sleep.

1 Like

It seems there is a several second delay when using was recently rendered, so it makes it fairly useless for my needs.

Correction, it seems there was an is valid ? node that was taking like 5 seconds to trigger a bool.

maybe if you want to check IF an actor is in front of you, you can also use a line trace to detect that target.

1 Like

You don’t happen to have any video links on that do ya? Thanks

this is the example of line tracing
How to raycast/line trace in Unreal Engine - YouTube
(Theres not only one way to trace. theres also shape trace like for example Sphere trace, capsule trace)

UE4 Tutorial: Detect if an Actor is on screen. - YouTube
I also found this that might be useful for you

1 Like

These should help, thanks!