Is there a function that states if a [specific object] currently in camera view?

With the Engine de-rendering all objects that are not currently in direct view of the camera for memory saving, I want to ask,

Is there a function that states if a [specific object] currently in camera view? Use it to trigger an event.

For example if Object Barrel is seen, disable collision.

#Get Rendered Actors

I wrote a custom BP node to do what you are asking.

I have it as part of my Vertex Snap plugin.

If you are sincerely interested and are using 4.1 I can update my plugin to 4.1

Rama

I saw your post.

Figured perhaps there was a way to have a function from an object reference instead of searching from a list of object title strings.

I would very much appreciate it.

#Updated

I have updated my plugin

and added a Blueprint Forum post about it :slight_smile:

I beleive this is it. Thw last only thing is. How do I execute something when I look at the object? Meaning I need this function to be checked all the time but as far as I understand continuous loops are restricted and things like Player Collide with trigger zone or On game Begin Playe are single time events.

Meaning is there any way to actually cause a trigger/execution when a specific actor is in the view?

Use the node “Single Line trace by Chanel”. This node trace a line between a start point (the camera) to another point (the object or a distance for exemple) then retrun what the line hit at the end. I just take this value and ask if the actor who is hit by the line is equal to the actor i want … And that it, if its true you see the actor, if not you dont. Youcan ignor certain actor (transluent material for exemple) and the line pass trough.

After that I use some math i saw in the content exemple for checking if the actor is in focus in the midle of the screen :

To finish I just ask if this 2 booleans are true (the AND Node). If both are true, that mean the object is not obsured by a wall for exemple, and if it’s in the focus of the camera :).

I hope this helped, sorry for my bad English :slight_smile:

Naa it sounds perfect. AND already integrated into the blueprint. Any way to continuously check for this line? Like a looping check?

I edited my post for more details, do continuously check I use an every tick event :). That maybye cost too much cpu usage just for check that but i dont see another option

would this be the right way to link Camera AND object? http://snag.gy/ckrAy.jpg

Yes, its what I did on my project and worked just fine.

You know I really don’t get it. If you are running a line from Point A to Point B then if you point the barrel as Point B then wouldn’t that mean that by default that line will ALWAYS point to and collide with the barrel?

Well due to my lack of understanding these two modules I have received a solution that does the approximate job here: How would I trigger an event depending on what the camera is looking at? - Cinematics & Media - Epic Developer Community Forums